| Modifier and Type | Class and Description |
|---|---|
class |
Exit
Exit is a subclass of Room.
|
| Modifier and Type | Field and Description |
|---|---|
private Room |
Player.currentRoom |
| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList<Room> |
World.rooms |
| Modifier and Type | Method and Description |
|---|---|
Room |
Player.getCurrentRoom()
Standard accessor method
|
Room |
Room.getLeftRoom(World world,
World.Direction direction)
getLeftRoom will return the room to the left
|
Room |
Room.getNextRoom(World world,
World.Direction direction)
getNextRoom will return the room that lies in the specified Direction
|
Room |
Room.getRightRoom(World world,
World.Direction direction)
getRightRoom will return the room to the right of an intended direction.
|
Room |
World.getRoom(int x,
int y)
Returns the room at the designated X and Y coordinates
|
Room |
Room.move(World world,
World.Direction direction)
move will move a player to the room that lies in the direction specified.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<Room> |
World.getRooms()
Standard accessor method
|
| Modifier and Type | Method and Description |
|---|---|
void |
World.addRoom(Room room)
addRoom adds a room to the world.
|
void |
Player.setCurrentRoom(Room currentRoom)
Mutator method which sets the player's current room and increments
his cumulative rewards.
|
private javax.swing.JTextArea |
Board.setRoomText(Room room,
Player player,
int x,
int y) |
| Modifier and Type | Method and Description |
|---|---|
void |
World.setRooms(java.util.ArrayList<Room> rooms)
Standard mutator method
|
| Constructor and Description |
|---|
Player(Room currentRoom)
Players always start in a current room, and immediately pick up the reward
of the starting location.
|