public class Game
extends java.lang.Object
| Constructor | Description |
|---|---|
Game(java.lang.String worldData) |
Create the game and initialise its internal map
|
| Modifier and Type | Method | Description |
|---|---|---|
Room |
getCurrentRoom() |
Return the current room.
|
Room |
getNamedRoom(java.lang.String roomName) |
Return the Room associated with a name.
|
static void |
main(java.lang.String[] args) |
Make a Game playable from the command line.
|
void |
play() |
Main play routine.
|
void |
setCurrentRoom(Room newRoom) |
Set the current room.
|
public Game(java.lang.String worldData)
worldData - World initialization data file name.public static void main(java.lang.String[] args)
args - No commandline arguments neededpublic Room getCurrentRoom()
public Room getNamedRoom(java.lang.String roomName)
roomName - The name of the desired Room.public void setCurrentRoom(Room newRoom)
newRoom - The new current Room.public void play()