rlgamekit.demo.pathfinding
Class PathSourceLink

java.lang.Object
  extended by rlgamekit.demo.pathfinding.PathSourceLink
All Implemented Interfaces:
PathSource

public class PathSourceLink
extends java.lang.Object
implements PathSource

Pathfinding will access map data through this class.


Constructor Summary
PathSourceLink(LayeredMap map)
           
 
Method Summary
 boolean isMoveAllowed(int fromX, int fromY, int toX, int toY)
          Checks if player is allowed to move into map cell (toX, toY)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathSourceLink

public PathSourceLink(LayeredMap map)
Method Detail

isMoveAllowed

public boolean isMoveAllowed(int fromX,
                             int fromY,
                             int toX,
                             int toY)
Checks if player is allowed to move into map cell (toX, toY)

Specified by:
isMoveAllowed in interface PathSource
Returns:
true if move is allowed, false otherwise