civquest
Class FlatCoSystem

java.lang.Object
  extended bycivquest.CoordinateSystem
      extended bycivquest.FlatCoSystem

public class FlatCoSystem
extends CoordinateSystem

Coordinate system for a "flat" map, meaning a map with cells laid out in a 2d matrix.


Field Summary
static Coordinate n
           
static int nx
           
 
Constructor Summary
FlatCoSystem()
           
 
Method Summary
 Coordinate getCoordinate(Coordinate from, int direction)
          Determines, for this coordinate system, the coordinate of the cell in the given direction.
 java.util.Vector getDirectNeighborCoordinates(Coordinate coord)
          The same function as above, it just returns the coordinates in a Vector (for the case that this helps the caller).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

public static final Coordinate n

nx

public static final int nx
See Also:
Constant Field Values
Constructor Detail

FlatCoSystem

public FlatCoSystem()
Method Detail

getCoordinate

public Coordinate getCoordinate(Coordinate from,
                                int direction)
Description copied from class: CoordinateSystem
Determines, for this coordinate system, the coordinate of the cell in the given direction.

Specified by:
getCoordinate in class CoordinateSystem

getDirectNeighborCoordinates

public java.util.Vector getDirectNeighborCoordinates(Coordinate coord)
Description copied from class: CoordinateSystem
The same function as above, it just returns the coordinates in a Vector (for the case that this helps the caller).

Specified by:
getDirectNeighborCoordinates in class CoordinateSystem