Home | Trees | Indices | Help |
|
---|
|
object --+ | Area
The class Area
represents locations in a text adventure
game world. A game world consists of areas. In general, an area can be
pretty much anything: a room, a building, an acre of forest, or something
completely different. What areas have in common is that players and items
can be located in them and that they have exits leading to other,
neighboring areas. An area also has a name and a description.
|
|||
|
|||
string |
|
||
string |
|
||
|
|||
area object |
|
||
|
|||
boolean |
|
||
item object |
|
||
Inherited from |
|
|||
Inherited from |
|
Creates a new area with the given name and description. The created area has no contents and no exits (yet).
|
Returns the name of the area.
|
Returns a full description of the area as a player sees it. The description includes the static, non-changing description of the area as set by the constructor, plus a listing of the items currently located in the area and an enumeration of the available exits.
|
Adds an exit from this area to another given area (or event the same area, if there is an exit leading back to where one started).
|
Returns the area where one ends up if moving in the given direction from this area.
|
Adds an item to the area.
|
Determines if the area contains an item of the given name.
|
Removes the item of the given name from the area, assuming it was there to begin with.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Aug 29 13:29:54 2012 | http://epydoc.sourceforge.net |