mstar
Class Exit

java.lang.Object
  |
  +--mstar.Exit
Direct Known Subclasses:
PathComponent

public class Exit
extends java.lang.Object
implements java.io.Serializable

This class models exits in collaborative environments. Exits are the mechanisms by which characters can navigate from one room to another.

Version:
1.6
Author:
Thaddeus O. Cooper (cooper@tweenproject.org)
See Also:
Serialized Form

Constructor Summary
Exit()
          An object that is used to represent exits in a Mud/MOO.
 
Method Summary
 void clearVisited()
          Deprecated.  
 boolean equal(Exit e)
          This routine determines if this exit is equal to another exit.
 java.lang.String getDirection()
          This routine gets the direction
 java.lang.String getExitName()
          This routine gets the name associated with this exit.
 int getFromRoom()
          This routine gets the room identifier of the room that this exit comes from.
 int getToRoom()
          This routine gets the room identifier of the room that this exit goes to.
 boolean hasBeenVisited()
          Deprecated.  
 boolean isConfusing()
          This routines determines if this is a confusing exit.
 void setConfusing()
          This routine sets this exit to show that it is confusing.
 void setConfusing(boolean confusing)
          This routine sets whether this is a confusing exit or not.
 void setDirection(java.lang.String direction)
          This routine sets the direction (e.g., out, north, etc.) that this exit goes
 void setExitName(java.lang.String exitName)
          This routine set the name associated with this exit.
 void setFromRoom(int fromRoom)
          This routine sets the room identifier of the room that this exit comes from.
 void setToRoom(int toRoom)
          This routine sets the room identifier of the room that this exit goes to.
 void setVisited()
          Deprecated.  
 void setVisited(boolean visited)
          Deprecated.  
 java.lang.String toString()
          This routine returns a string that can be used in the Mud/MOO to "go" to the room.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Exit

public Exit()
An object that is used to represent exits in a Mud/MOO. This object keeps information about the room that it came from and the room that it is going to. In addition the object also can hold information about whether the exit points to a confusing room, so that this exit can be used cautiously in giving directions or creating paths to rooms.
Method Detail

setExitName

public void setExitName(java.lang.String exitName)
This routine set the name associated with this exit.
Parameters:
exitName - -- the name of the exit

getExitName

public java.lang.String getExitName()
This routine gets the name associated with this exit.

setDirection

public void setDirection(java.lang.String direction)
This routine sets the direction (e.g., out, north, etc.) that this exit goes
Parameters:
direction - -- the direction

getDirection

public java.lang.String getDirection()
This routine gets the direction

setToRoom

public void setToRoom(int toRoom)
This routine sets the room identifier of the room that this exit goes to.
Parameters:
toRoom - -- the number of the room that this exit goes to.

getToRoom

public int getToRoom()
This routine gets the room identifier of the room that this exit goes to.

setFromRoom

public void setFromRoom(int fromRoom)
This routine sets the room identifier of the room that this exit comes from.
Parameters:
fromRoom - -- the number of the room that this exit comes from.

getFromRoom

public int getFromRoom()
This routine gets the room identifier of the room that this exit comes from.
Returns:
fromRoom -- the number of the room that this exit comes from.

toString

public java.lang.String toString()
This routine returns a string that can be used in the Mud/MOO to "go" to the room.
Overrides:
toString in class java.lang.Object

setVisited

public void setVisited(boolean visited)
Deprecated.  

This routine sets the visited flag to the appropriate value.

setVisited

public void setVisited()
Deprecated.  

This routine sets the visited flag.

clearVisited

public void clearVisited()
Deprecated.  

This routine clears the visited flag.

hasBeenVisited

public boolean hasBeenVisited()
Deprecated.  

This routine returns whether or not this room has been previously visited.

setConfusing

public void setConfusing(boolean confusing)
This routine sets whether this is a confusing exit or not.
Parameters:
confusing - -- determines if this exit should be considered confusing.

setConfusing

public void setConfusing()
This routine sets this exit to show that it is confusing.

isConfusing

public boolean isConfusing()
This routines determines if this is a confusing exit.

equal

public boolean equal(Exit e)
This routine determines if this exit is equal to another exit.
Parameters:
e - -- the exit to be tested.