getCost
public float getCost(PathBasedMap<? extends AbstractPathTile> map,
PathMover mover,
int x,
int y,
int tx,
int ty)
Get the additional heuristic cost of the given tile. This controls the
order in which tiles are searched while attempting to find a path to the
target location. The lower the cost the more likely the tile will be searched.
- Specified by:
getCost
in interface AStarHeuristic
- Parameters:
map
- The map on which the path is being found.mover
- The entity that is moving along the path.x
- The x coordinate of the tile being evaluated.y
- The y coordinate of the tile being evaluated.tx
- The x coordinate of the target location.ty
- Teh y coordinate of the target location.
- Returns:
- The cost associated with the given tile.