19 lines
No EOL
363 B
TypeScript
19 lines
No EOL
363 B
TypeScript
import { Rectangle } from "../rects/rectangles";
|
|
|
|
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(Math.floor(day), -1);
|
|
}
|
|
} |