Added Item-viewing functionality to the room class! Also changed some

descriptions
This commit is contained in:
Luca Carnegie
2019-05-27 20:34:11 -04:00
parent e4ba347415
commit 1d0888f0df
3 changed files with 14 additions and 4 deletions

View File

@@ -1,4 +1,3 @@
package com.bayviewglen.zork;
/*
@@ -172,6 +171,14 @@ class Room {
returnString += " " + iter.next();
return returnString;
}
public String itemString(){
String items = "Items in Room: " + this.items.get(0).getName();
for(int i = 1; i < this.items.size(); i++) {
items += ", " + this.items.get(i).getName();
}
return items;
}
/**
* Return the room that is reached if we go from this room in direction