doggo-quest-logic
Version:
The game logic for the Doggo Quest text-based game sample project
36 lines (35 loc) • 1.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const GameObjectBase_1 = require("../GameObjectBase");
const LivingRoomObject_1 = require("../KitchenArea/LivingRoomObject");
const Room_1 = require("../Room");
const RoomBase_1 = require("../RoomBase");
const CouchObject_1 = require("./CouchObject");
const DarknessObject_1 = require("./DarknessObject");
const UnderCouchFloorObject_1 = require("./UnderCouchFloorObject");
class UnderCouchObject extends GameObjectBase_1.GameObjectBase {
constructor(room) {
super('undercouch');
this.children = [
new CouchObject_1.CouchObject(room),
new UnderCouchFloorObject_1.UnderCouchFloorObject(room),
new DarknessObject_1.DarknessObject(room)
];
}
}
class UnderCouch extends RoomBase_1.RoomBase {
constructor() {
super('Living Room (Under Couch)', Room_1.Room.UnderCouch);
this.objects = [
new LivingRoomObject_1.LivingRoomObject(Room_1.Room.UnderCouch),
new UnderCouchObject(Room_1.Room.UnderCouch)
];
this.out = Room_1.Room.Living;
}
describe(context) {
context.addText(`This is my own personal den underneath the couch. Mommy doesn't like it when I go here, but it's dark and quiet ` +
`and a good place to rest before I'm ready to exit and go back out to the living room.`);
context.addText(`It's hard to see anything in here. If something is here, I'll have to sniff for it.`);
}
}
exports.UnderCouch = UnderCouch;