public class Player
extends java.lang.Object
| Constructor and Description |
|---|
Player(TreasureRoom room)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Starts the game on a random 5x5 room.
|
void |
moveDown()
Moves the player down.
|
void |
moveLeft()
Moves the player left.
|
void |
moveRight()
Moves the player Right.
|
void |
moveUp()
Moves the player up.
|
void |
pickUp()
Picks up the content on the room.
|
public Player(TreasureRoom room)
public void moveUp()
java.lang.IllegalStateException - when it would make the player move out of the room.public void moveDown()
java.lang.IllegalStateException - when it would make the player move out of the room.public void moveRight()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - when it would make the player move out of the room.public void moveLeft()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - when it would make the player move out of the room.public void pickUp()
public static void main(java.lang.String[] args)
args -