|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstudent.adventure.Player
public class Player
This class represents a player in an adventure game. Each player has a current location.
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Player()
Method Detail |
---|
public Room getCurrentRoom()
public void setCurrentRoom(Room room)
room
- The room to move topublic void walk(java.lang.String direction)
direction
- Which way to walk
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |