rot-js
Version:
A roguelike toolkit in JavaScript
23 lines (22 loc) • 544 B
JavaScript
import Map from "./map.js";
/**
* @class Dungeon map: has rooms and corridors
* @augments ROT.Map
*/
export default class Dungeon extends Map {
constructor(width, height) {
super(width, height);
this._rooms = [];
this._corridors = [];
}
/**
* Get all generated rooms
* @returns {ROT.Map.Feature.Room[]}
*/
getRooms() { return this._rooms; }
/**
* Get all generated corridors
* @returns {ROT.Map.Feature.Corridor[]}
*/
getCorridors() { return this._corridors; }
}