From d7206c1a4337041a914489e8dc68b90a0c1db2e1 Mon Sep 17 00:00:00 2001 From: Luca Carnegie <41924665+lcarnegie@users.noreply.github.com> Date: Fri, 31 May 2019 21:12:16 -0400 Subject: [PATCH] fixed some things --- data/rooms.dat | 2 +- src/com/bayviewglen/zork/Game.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/data/rooms.dat b/data/rooms.dat index c319b7e..c4ca21e 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -164,7 +164,7 @@ Locked: false Boarded: false Items: Riddler: -Exit Rooms: S-Apsen Bedroom, E-Willow Bedroom +Exit Rooms: S-Aspen Bedroom, E-Willow Bedroom Room name: Guest Bedroom Room Description: Welcome to the guest bedroom, where guests like yourself stay for the night. There is another tailored
man in the corner. He seems to have something he would like to tell you. diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java index 8305e06..546f6f2 100644 --- a/src/com/bayviewglen/zork/Game.java +++ b/src/com/bayviewglen/zork/Game.java @@ -219,6 +219,10 @@ class Game { System.out.print(currentRoom.longDescription()); System.out.println(currentRoom.itemString()); System.out.println(currentRoom.exitString()); + player.addToInventory(new Lockpick()); + player.addToInventory(new Crowbar()); + player.addToInventory(new Key()); + player.addToInventory(new Batteringram()); boolean finished = false; while (!finished) { if (currentCombat != null) { @@ -276,7 +280,7 @@ class Game { if (command.hasDirection() && hasLockPick) { Room nextRoom = currentRoom.nextRoom(command.getDirection()); try { -if(nextRoom.getLocked()) { + if(nextRoom.getLocked()) { nextRoom.setLocked(false); player.removeFromInventory(new Lockpick()); System.out.println("After a little bit of picking, a click is heard and the door opens slightly!");