Package
Class
Index
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
C
G
H
R
S
A
addObject(AdvObject)
- Method in class
AdvRoom
Adds an object to the list of objects in the room.
Adventure
- Class in
<Unnamed>
This class is the main program class for the Adventure game.
AdvMotionTableEntry
- Class in
<Unnamed>
This class is used to store a single entry in the motion table.
AdvMotionTableEntry(String, int, String)
- Constructor for class
AdvMotionTableEntry
Creates a new motion table entry.
AdvObject
- Class in
<Unnamed>
This class defines an object in the Adventure game.
AdvRoom
- Class in
<Unnamed>
This class defines a single room in the Adventure game.
C
containsObject(AdvObject)
- Method in class
AdvRoom
Checks whether the specified object is in the room.
G
getDescription()
- Method in class
AdvObject
Returns the one-line description of the object.
getDescription()
- Method in class
AdvRoom
Returns a string array giving the long description of the room.
getDestinationRoom()
- Method in class
AdvMotionTableEntry
Returns the room number to which a particular direction leads.
getDirection()
- Method in class
AdvMotionTableEntry
Returns the direction name from a motion table entry.
getInitialLocation()
- Method in class
AdvObject
Returns the initial location of the object.
getKeyName()
- Method in class
AdvMotionTableEntry
Returns the name of the object required to travel along a locked passage, or
null
if the passage is open.
getMotionTable()
- Method in class
AdvRoom
Returns the motion table associated with this room, which is an array of directions, room numbers, and key objects stored in an
AdvMotionTableEntry
.
getName()
- Method in class
AdvObject
Returns the object name, which is the word used to refer to it.
getName()
- Method in class
AdvRoom
Returns the room name, which is its one-line description.
getObject(int)
- Method in class
AdvRoom
Returns the specified element from the list of objects in the room.
getObjectCount()
- Method in class
AdvRoom
Returns the number of objects in the room.
getRoomNumber()
- Method in class
AdvRoom
Returns the room number.
H
hasBeenVisited()
- Method in class
AdvRoom
Returns
true
if the room has previously been visited.
R
readObject(BufferedReader)
- Static method in class
AdvObject
Creates a new object by reading its data from the specified reader.
readRoom(BufferedReader)
- Static method in class
AdvRoom
Creates a new room by reading its data from the specified reader.
removeObject(AdvObject)
- Method in class
AdvRoom
Removes an object from the list of objects in the room.
run()
- Method in class
Adventure
Runs the Adventure program.
S
setVisited(boolean)
- Method in class
AdvRoom
Sets a flag indicating whether this room has been visited.
A
C
G
H
R
S
Package
Class
Index
PREV NEXT
FRAMES
NO FRAMES
All Classes