Take, drop and command echo

This commit is contained in:
2021-11-04 22:47:09 +01:00
parent abb3c475db
commit 37759d7b9f
8 changed files with 75 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ export default class Game {
this.items = [];
this.output = new Output();
this.commandHandler = new Commands(this);
this.input = new Input(this.commandHandler);
this.input = new Input(this.commandHandler, this.output);
this.visitedRooms = new Map();
}
@@ -34,6 +34,7 @@ export default class Game {
this.state = data.state;
this.commandHandler.addCommands(data.commands);
this.player = new Player();
this.player.context = this;
this.move(this.player.currentRoom);
}