/**** * Person * * is the one moving through the rooms. * ***/ class Person { private Room currentLocation; private String name; private String[] inventory; Person(String who, Room startingRoom){ currentLocation = startingRoom; name = who; inventory = new String[100]; } void showInventory(){ // print out items in your inventory... } void pickUp(int whichItem){ int i=0; while ( inventory[i] != null && i<100) { i++; } inventory[i] = currentLocation.thingsOnFloor[whichItem]; currentLocation.thingsOnFloor[whichItem] = null; } void status(){ System.out.println( "\n You are in "+currentLocation.getShortDescription()+"."); } void moveTo(int whichWay){ if ( currentLocation.doorTo[whichWay] == null ){ System.out.println(" Oops - you can't move that way.\n"); } else { currentLocation = currentLocation.doorTo[whichWay]; System.out.println(" You walk " + Room.directions[whichWay]+"."); } } void look(){ System.out.println("\n You look around you and see the following."); System.out.println(currentLocation.getLongDescription()); } }