doggo-quest-logic
Version:
The game logic for the Doggo Quest text-based game sample project
29 lines (28 loc) • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const GameObjectBase_1 = require("../GameObjectBase");
const Room_1 = require("../Room");
const DiningObject_1 = require("./DiningObject");
const KitchenCounterObject_1 = require("./KitchenCounterObject");
const KitchenFloorObject_1 = require("./KitchenFloorObject");
class KitchenObject extends GameObjectBase_1.GameObjectBase {
constructor(room) {
super('kitchen');
this.children = [
new KitchenFloorObject_1.KitchenFloorObject(),
new KitchenCounterObject_1.KitchenCounterObject(),
];
if (room === Room_1.Room.Kitchen) {
this.children.push(new DiningObject_1.DiningObject(room));
}
else {
this.smell = 'It smells like food, but you need to get closer';
this.lick = this.TooFarMessage;
this.eat = this.TooFarMessage;
this.push = this.TooFarMessage;
this.pull = this.TooFarMessage;
}
this.think = 'The kitchen is amazing! It\'s where all the food lives. Sadly, you don\'t always get to eat that food, but sometimes there are crumbs.';
}
}
exports.KitchenObject = KitchenObject;