class rotating { #sideways; #up_down; static get top() { return 1; } static get bottom() { return -1; } static get left() { return -1; } static get right() { return 1; } constructor() { this.stop(); } stop() { this.#sideways = 0; this.#up_down = 0; } add_top() { this.#up_down = rotating.top; } add_bottom() { this.#up_down = rotating.bottom; } add_left() { this.#sideways = rotating.left; } add_right() { this.#sideways = rotating.right; } stop_sideways() { this.#sideways = 0; } stop_up_down() { this.#up_down = 0; } get is_left() { return this.#sideways === rotating.left; } get is_right() { return this.#sideways === rotating.right; } get is_top() { return this.#up_down === rotating.top; } get is_bottom() { return this.#up_down === rotating.bottom; } } export { rotating }