|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPlayer
public class Player
This class represents players in the game. Each player has a current location.
Field Summary | |
---|---|
private Room |
currentRoom
|
Constructor Summary | |
---|---|
Player()
Constructor for objects of class Player |
Method Summary | |
---|---|
Room |
getCurrentRoom()
Return the current room for this player. |
void |
setCurrentRoom(Room room)
Set the current room for this player. |
void |
walk(java.lang.String direction)
Try to walk in a given direction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Room currentRoom
Constructor Detail |
---|
public Player()
Method Detail |
---|
public Room getCurrentRoom()
public void setCurrentRoom(Room room)
public void walk(java.lang.String direction)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |