import TILES from "./tiles"; import Point from "./point"; export default class Room { width: number; height: number; private tiles; x: number; y: number; left: number; right: number; top: number; bottom: number; centerX: number; centerY: number; constructor(width: number, height: number); forEachTile(fn: (p: Point, t: TILES) => void): void; setPosition(x: number, y: number): void; getDoorLocations(): Point[]; overlaps(otherRoom: Room): boolean; /** * Check if the given local coordinates are within the dimensions of the room. * @param x * @param y */ isInBounds(x: number, y: number): boolean; /** * Get the tile at the given local coordinates of the room. * @param x * @param y */ getTileAt(x: number, y: number): TILES; /** * Set the tile at the given local coordinates of the room. * @param x * @param y * @param tile */ setTileAt(x: number, y: number, tile: TILES): void; /** * Check if two rooms share a door between them. * @param otherRoom */ isConnectedTo(otherRoom: Room): boolean; }