take and inventory command

This commit is contained in:
jslightham
2019-05-16 22:40:55 -04:00
parent 4506c1e17f
commit 2781520ba5
5 changed files with 66 additions and 29 deletions

View File

@@ -187,4 +187,12 @@ class Room {
public void setDescription(String description) {
this.description = description;
}
public boolean hasItem(Item item) {
boolean hasItem = false;
for(Item i : items) {
if(i.equals(item))
hasItem = true;
}
return hasItem;
}
}