public String getItemDescription()
if(name == null)
return "There are no items in this room";
return "There is a " + name + " that weighs " + weight + " pounds.\nIt is a " + Idescription;
Right now it prints the last item in the room... how can I get it to display all the items in the room... basically saying that entire return statement for as many items there are in the room?
Originally posted by Martin vanPutten:
You presumed right... I do have a collection of Items and Rooms. But I don't know how to write the loop to do it... I can't seem to wrap my head around how to do it in this case... just a brain fart... buts its hurting!! Any suggestions to get me started on it?
How about something like (in pseudo code)...