advent22/ui/src/components/door_map/calendar.ts

19 lines
351 B
TypeScript
Raw Normal View History

2023-02-01 16:53:24 +00:00
import { Rectangle } from "../rects/rectangles";
2023-02-02 18:06:55 +00:00
export class Door {
private _day = -1;
public position: Rectangle;
constructor(position: Rectangle, day = -1) {
this.day = day;
this.position = position;
}
public get day(): number {
return this._day
}
public set day(day: number) {
this._day = Math.max(day, -1);
}
2023-02-01 16:53:24 +00:00
}