Class AdvMotionTableEntry

Object
  extended by AdvMotionTableEntry

public class AdvMotionTableEntry
extends Object

This class is used to store a single entry in the motion table.


Constructor Summary
AdvMotionTableEntry(String dir, int room, String key)
          Creates a new motion table entry.
 
Method Summary
 int getDestinationRoom()
          Returns the room number to which a particular direction leads.
 String getDirection()
          Returns the direction name from a motion table entry.
 String getKeyName()
          Returns the name of the object required to travel along a locked passage, or null if the passage is open.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvMotionTableEntry

public AdvMotionTableEntry(String dir,
                           int room,
                           String key)
Creates a new motion table entry.

Parameters:
dir - The string specifying the direction of motion
room - The number of the destination room
key - The name of the key object, or null if none
Method Detail

getDirection

public String getDirection()
Returns the direction name from a motion table entry.

Returns:
The string specifying the direction of motion

getDestinationRoom

public int getDestinationRoom()
Returns the room number to which a particular direction leads.

Returns:
The number of the destination room

getKeyName

public String getKeyName()
Returns the name of the object required to travel along a locked passage, or null if the passage is open.

Returns:
The name of the key object, or null for none