org.newdawn.slick.util.pathfinding
Interface AStarHeuristic
- All Known Implementing Classes:
- ClosestHeuristic, ClosestSquaredHeuristic, ManhattanHeuristic
public interface AStarHeuristic
The description of a class providing a cost for a given tile based
on a target location and entity being moved. This heuristic controls
what priority is placed on different tiles during the search for a path
- Author:
- Kevin Glass
Method Summary |
float |
getCost(TileBasedMap map,
Mover mover,
int x,
int y,
int tx,
int ty)
Get the additional heuristic cost of the given tile. |
getCost
float getCost(TileBasedMap map,
Mover 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.
- Parameters:
map
- The map on which the path is being foundmover
- The entity that is moving along the pathx
- The x coordinate of the tile being evaluatedy
- The y coordinate of the tile being evaluatedtx
- The x coordinate of the target locationty
- Teh y coordinate of the target location
- Returns:
- The cost associated with the given tile
Copyright © 2006 New Dawn Software. All Rights Reserved.