| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList<World.Direction> |
Room.exits |
| Modifier and Type | Method and Description |
|---|---|
static World.Direction |
World.getRandomDirection()
Gets a random direction
|
private World.Direction |
Room.leftOf(World.Direction direction)
Utility function which returns the direction 90 degrees to the left of any direction.
|
private World.Direction |
Room.rightOf(World.Direction direction)
Utility function which returns the direction 90 degrees to the right of any direction.
|
static World.Direction |
World.Direction.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static World.Direction[] |
World.Direction.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<World.Direction> |
Room.getExits()
Standard accessor method
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
Driver.addExit(int x,
int y,
World.Direction direction,
World world)
addExit will add an exit to the room which matches the X and Y coordinates
|
void |
Room.addExit(World.Direction exit)
addExit will add an exit to a room
|
static java.lang.String |
World.getArrow(World.Direction direction)
getArrow will return the ASCII character for an arrow corresponding to a Direction
|
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.
|
private World.Direction |
Room.leftOf(World.Direction direction)
Utility function which returns the direction 90 degrees to the left of any direction.
|
Room |
Room.move(World world,
World.Direction direction)
move will move a player to the room that lies in the direction specified.
|
private World.Direction |
Room.rightOf(World.Direction direction)
Utility function which returns the direction 90 degrees to the right of any direction.
|