diff --git a/data/rooms.dat b/data/rooms.dat
index f284140..114a774 100644
--- a/data/rooms.dat
+++ b/data/rooms.dat
@@ -2,8 +2,8 @@ Room name: Circle Room
Room Description: You are in a circular room. The windows to the east are covered with boards that
let in just enough light to see. You spot a man in a tailored suit moving some crates around.
Locked: false
Boarded: false
-Items:Lockpick,Milk
-Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master
Sir Pellatt has wrongfully imprisoned you. If you answer my riddle I can give you something to
help you with your escape - nothing comes for free you know!", "What goes moo?", "Cows", Shavingcream
+Items: Lightbulb,Candlestick
+Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master
Sir Pellatt has wrongfully imprisoned you. If you answer my riddle I can give you something to
help you with your escape - nothing comes for free you know!", "What goes moo?", "Cows", Lockpick
Exit Rooms: W-Apple Hallway
Room name: Apple Hallway
@@ -57,8 +57,8 @@ Exit Rooms: S-Lady Pellatt's Bedroom
Room name: Pipe Room
Room Description: Welcome to the Pipe Room. A misty smell fills the room. Strange items
lay in a pile near the north wall. I suggest you take a look...
Locked: false
-Boarded: false
-Items:Clock,Lightbulb,Keyboard
+Boarded: false
+Items:Clock,Lightbulb,Keyboard
Riddler:
Exit Rooms: W-Porcupine Stairs (2nd Floor), S-Landing, N-East Sitting Room, E-Round Room
@@ -73,8 +73,8 @@ Exit Rooms: W-Pipe Room, N-Elm Bedroom, S-Oak Bedroom
Room name: Elm Bedroom
Room Description: You are in the Elm Bedroom. The walls are all wooden and a few windows face north.
A bed sits in the middle of the room. A few pillows are on the ground. It looks like someone was in here...
Locked: false
-Boarded: false
-Items:Water bottle,Pen,Book
+Boarded: false
+Items:Water bottle,Pen,Book
Riddler:
Exit Rooms: S-Round Room, W-East Sitting Room
@@ -169,10 +169,10 @@ Exit Rooms: S-Apsen 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.
Locked: false
-Boarded: false
+Boarded: false
Items:
Riddler: "Hello there Kevin again with another riddle for you to solve. What are the next 3 letters in this sequence: ottffss?", "ent"
-Exit Rooms: E-Linen Closet, S-Another Sitting Area, N-Lady Pellatt's Bedroom
+Exit Rooms: E-Linen Closet, S-Another Sitting Area, N-Lady Pellatt's Bedroom
Room name: Silver Stairs (1st Floor)
Room Description: Welcome to the First Floor. You made it this far, don't give up now. Quite a few doors are open down here.
Someone even left a few lights on although it could just be the servants.
@@ -225,9 +225,9 @@ Exit Rooms: S-Serving and Breakfast Room, E-Library, W-Conservatory
Room name: Conservatory
Room Description: You are now in the Conservatory. The walls and ceilings are all glass, which gives you a gorgeous view of the outdoors.
A few potted plants lay directly in the sunlight. There is a tailored woman standing in the corner of the room.
Locked: false
-Boarded: false
+Boarded: false
Items:
-Riddler: "Hey I'm Karen. Kevin is on his break but he told me to give you this riddle:
Marking mortal privation when firmly in place. An enduring summation inscribed in my face. What am I?", "tombstone"
+Riddler: "Hey I'm Karen. Kevin is on his break but he told me to give you this riddle:
Marking mortal privation when firmly in place. An enduring summation inscribed in my face. What am I?", "tombstone"
Exit Rooms: E-Dining Room
Room name: Library
diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java
index 1f24545..0656a57 100644
--- a/src/com/bayviewglen/zork/Game.java
+++ b/src/com/bayviewglen/zork/Game.java
@@ -385,7 +385,7 @@ class Game {
if(player.addToInventory(prize)) {
player.addToInventory(prize);
System.out.println("A " + prizeName + " has been added to your inventory.");
- currentRoom.riddler = null;
+ currentRoom.removeRiddler();
System.out.println("I've got to go find Mr. Pellatt now. Good luck with your escape!");
}else {
System.out.println("Sorry, you can't carry any more ");
@@ -543,6 +543,7 @@ class Game {
return false;
}
+
// implementations of user commands:
/**
* Print out some help information. Here we print some stupid, cryptic
diff --git a/src/com/bayviewglen/zork/Room.java b/src/com/bayviewglen/zork/Room.java
index 97a6866..aca9213 100644
--- a/src/com/bayviewglen/zork/Room.java
+++ b/src/com/bayviewglen/zork/Room.java
@@ -27,7 +27,7 @@ class Room {
private String description;
private HashMap exits; // stores exits of this room.
private ArrayList- items;
- Riddler riddler; //needs to altered outside of the class so that riddler can be set to null.
+ private Riddler riddler; //needs to altered outside of the class so that riddler can be set to null.
private boolean locked; // Otherwise you can repeatedly solve the riddle and get unlimited items
private boolean boarded;
@@ -239,5 +239,10 @@ class Room {
public Riddler getRiddler() {
return riddler;
}
+
+ public void removeRiddler() {
+ riddler = null;
+
+ }
}