rlgamekit.pathfinding
Class CoordinatePathDestination

java.lang.Object
  extended by rlgamekit.pathfinding.CoordinatePathDestination
All Implemented Interfaces:
PathDestination

public class CoordinatePathDestination
extends java.lang.Object
implements PathDestination

Tell pathfinder if the destination coordinate has been reached.


Constructor Summary
CoordinatePathDestination(int x, int y)
          Set the destination coordinate to be checked.
 
Method Summary
 boolean isDestinationReached(int posX, int posY)
          Tell pathfinder if the destination coordinate has been reached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinatePathDestination

public CoordinatePathDestination(int x,
                                 int y)
Set the destination coordinate to be checked.

Parameters:
x - X coordinate
y - Y coordinate
Method Detail

isDestinationReached

public boolean isDestinationReached(int posX,
                                    int posY)
Tell pathfinder if the destination coordinate has been reached.

Specified by:
isDestinationReached in interface PathDestination
Parameters:
posX - The x coordinate to check
posY - The y coordinate to check
Returns:
true if destination has been reached, false otherwise.