This commit is contained in:
OfficialCHenry 2022-04-06 22:55:46 -04:00
commit 0cd7cbab83

View File

@ -176,6 +176,19 @@ export default class RandomMapGenerator {
return Facing.DOWN;
}
private getOppositeFacing(facing: Facing): Facing {
switch (facing) {
case Facing.LEFT:
return Facing.RIGHT;
case Facing.RIGHT:
return Facing.LEFT;
case Facing.UP:
return Facing.DOWN;
case Facing.DOWN:
return Facing.UP;
}
}
private getRandomRoom(value: number, facing: Facing): RoomTemplate {
let array = this.getRoomArray(facing), weight = this.getRoomWeight(facing);