|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcs1705.adventure.Room
Represents one location in the scenery of an adventure game. It is connected to other rooms via exits. For each existing exit, the room stores a reference to the neighboring room. This class is part of the "World of Zuul" framework for writing very simple text-based adventure games.
| Constructor Summary | |
Room(String description)
Create a room described "description". |
|
| Method Summary | |
Room |
getExit(String direction)
Return the room that is reached if we go from this room in direction "direction". |
String |
getLongDescription()
Return a long description of this room, including a list of available exits. |
String |
getShortDescription()
Return the description of the room (the one that was defined in the constructor). |
void |
setExit(String direction,
Room neighbor)
Define an exit from this room. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Room(String description)
| Method Detail |
public Room getExit(String direction)
public String getLongDescription()
You are in the kitchen.
Exits: north west
public String getShortDescription()
public void setExit(String direction,
Room neighbor)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||