added a removeRiddler() method.

This commit is contained in:
Luca Carnegie
2019-05-30 23:41:20 -04:00
parent 38a10f116d
commit 0da2e95425
3 changed files with 10 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ class Room {
private String description;
private HashMap<String, Room> exits; // stores exits of this room.
private ArrayList<Item> 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;
}
}