Created
July 30, 2016 14:40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Room } from './room'; | |
import { Thing } from './thing'; | |
export class Dungeon { | |
rooms: Room[] = []; | |
inventory: Thing[] = []; | |
trophyCount: number = 0; | |
currentRoomIdx: number = -1; | |
public get currentRoom(): Room { | |
if (this.currentRoomIdx < 0 || this.currentRoomIdx >= this.rooms.length) { | |
return null; | |
} | |
return this.rooms[this.currentRoomIdx]; | |
} | |
public console: string [] = []; | |
public won: boolean = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment