Class Room
java.lang.Object
|
+--Room
- class Room
- extends java.lang.Object
Constructor Summary |
Room(java.lang.String description)
Create a room described "description". |
Method Summary |
Room |
getExit(java.lang.String direction)
Return the room that is reached if we go from this room in direction
"direction". |
java.lang.String |
getLongDescription()
Return a long description of this room, in the form:
You are in the kitchen. |
java.lang.String |
getShortDescription()
Return the description of the room (the one that was defined in the
constructor). |
void |
setExit(java.lang.String direction,
Room neighbor)
Define an exit from this room. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Room
public Room(java.lang.String description)
- Create a room described "description". Initially, it has no exits.
"description" is something like "in a kitchen" or "in an open court
yard".
getExit
public Room getExit(java.lang.String direction)
- Return the room that is reached if we go from this room in direction
"direction". If there is no room in that direction, return null.
getLongDescription
public java.lang.String getLongDescription()
- Return a long description of this room, in the form:
You are in the kitchen.
Exits: north west
getShortDescription
public java.lang.String getShortDescription()
- Return the description of the room (the one that was defined in the
constructor).
setExit
public void setExit(java.lang.String direction,
Room neighbor)
- Define an exit from this room.
Generated by BlueJ