made changing descriptions and added a spicy new riddle

This commit is contained in:
Luca Carnegie
2019-06-01 00:46:40 -04:00
parent 3787f4b1f2
commit cd76933723
3 changed files with 8 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ import com.bayviewglen.zork.Items.*;
class Room {
private String roomName;
private String description;
private String newRoomDescription;
private String newDescription;
private HashMap<String, Room> exits; // stores exits of this room.
private ArrayList<Item> items;
private Riddler riddler; //needs to altered outside of the class so that riddler can be set to null.
@@ -254,6 +254,7 @@ class Room {
public void removeRiddler() {
riddler = null;
this.description = newDescription;
}
@@ -266,7 +267,7 @@ class Room {
}
public void setNewRoomDescription(String newRoomDesc) {
this.newRoomDescription = newRoomDesc;
this.newDescription = newRoomDesc;
}