maze.geometry
Class PathEnd

java.lang.Object
  extended bymaze.geometry.PathEnd

public class PathEnd
extends java.lang.Object

The end of a path being generated.


Field Summary
protected  Coordinate theCoordinate
          The Coordinate for the end of the path.
protected  int theDirection
          The direction of the end of the path.
 
Constructor Summary
PathEnd(Coordinate c, int d)
          Creates a new PathEnd from a Coordinate and a direction.
 
Method Summary
 Coordinate coord()
          Returns the Coordinate for the end of the path.
 int dir()
          Returns the current direction.
 java.lang.String toString()
          Returns a String representation for the end of the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

theCoordinate

protected Coordinate theCoordinate
The Coordinate for the end of the path. This identifies the last cell.


theDirection

protected int theDirection
The direction of the end of the path. This identifies the intended exit from the cell.

Constructor Detail

PathEnd

public PathEnd(Coordinate c,
               int d)
Creates a new PathEnd from a Coordinate and a direction.

Parameters:
c - Coordinate location of the cell at the end of a path.
d - int direction in which the path is being generated.
Method Detail

dir

public int dir()
Returns the current direction.

Returns:
int current direction for the path.

coord

public Coordinate coord()
Returns the Coordinate for the end of the path.

Returns:
Coordinate location of the cell at the end of the path.

toString

public java.lang.String toString()
Returns a String representation for the end of the path.

Returns:
String representation for the end of the path.