![]() |
Adventure at Umalu
22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
|
Public Member Functions | |
List< Coordinate > | calcPath (World world, Coordinate start, Coordinate end) |
![]() | |
final List< Coordinate > | getPartialPath (World world, Coordinate start, Coordinate end) |
final List< Coordinate > | getPartialPath (World world, int posX, int posY, int endX, int endY) |
final List< Coordinate > | getPath (World world, Coordinate start, Coordinate end) |
final List< Coordinate > | getPath (World world, int posX, int posY, int endX, int endY) |
A
which uses the A* path finding algorithm to quickly calculate optimal paths. The implementation uses Cartesian distance as both traversal cost and heuristic estimates. If a path exists it is guaranteed to be found, and an optimal path will always be returned. If no path exists, a partial path from the accessible location closest to the goal will be returned.
|
virtual |
Calculates and returns the partial path from the given start to end on the provided
. Since the path is incomplete, it may or may not terminate at the provided end. Null should never be returned from this method. If a path cannot be found, a partial path, or at least an empty path should be returned.
world | the world on which the path is calculated |
start | the start of the calculated path |
end | the intended end of the calculated path |
Implements jade.path.PathFinder.