|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.pathfinding.ClosestHeuristic
public class ClosestHeuristic
A heuristic that uses the tile that is closest to the target as the next best tile.
Constructor Summary | |
---|---|
ClosestHeuristic()
|
Method Summary | |
---|---|
float |
getCost(PathBasedMap<? extends AbstractPathTile> map,
Pathfindable mover,
int x,
int y,
int tx,
int ty)
This controls the order in which tiles are searched while attempting to find a path to the target location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClosestHeuristic()
Method Detail |
---|
public float getCost(PathBasedMap<? extends AbstractPathTile> map, Pathfindable mover, int x, int y, int tx, int ty)
AStarHeuristic
getCost
in interface AStarHeuristic
map
- map on which the path is being found.mover
- entity that is moving along the path.x
- x coordinate of the tile being evaluated.y
- y coordinate of the tile being evaluated.tx
- x coordinate of the target location.ty
- y coordinate of the target location.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |