![]() |
Adventure at Umalu
22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
|
Public Member Functions | |
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) |
Protected Member Functions | |
abstract List< Coordinate > | calcPath (World world, Coordinate start, Coordinate end) |
Represents an algorithm for calculating paths on a
. These paths can be either partial, meaning the path may not actually reach its goal, or complete, meaning it is either
or reaches its goal.
|
protectedpure 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 |
Implemented in jade.path.AStar, and jade.path.Bresenham.
final List<Coordinate> jade.path.PathFinder.getPartialPath | ( | World | world, |
Coordinate | start, | ||
Coordinate | end | ||
) |
Returns a 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.
world | the world on which the path is calculated |
start | the start of the calculated path |
end | the intended end of the calculated path |
final List<Coordinate> jade.path.PathFinder.getPartialPath | ( | World | world, |
int | posX, | ||
int | posY, | ||
int | endX, | ||
int | endY | ||
) |
Returns a 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.
world | the world on which the path is calculated |
posX | the x value of the start |
posY | the y value of the start |
endX | the x value of the end |
endY | the y value of the end |
final List<Coordinate> jade.path.PathFinder.getPath | ( | World | world, |
Coordinate | start, | ||
Coordinate | end | ||
) |
Returns a partial path from the given start to end on the provided
. Since the path is complete, it will either be null, or terminate at the given end.
world | the world on which the path is calculated |
start | the start of the calculated path |
end | the intended end of the calculated path |
final List<Coordinate> jade.path.PathFinder.getPath | ( | World | world, |
int | posX, | ||
int | posY, | ||
int | endX, | ||
int | endY | ||
) |
Returns a complete path from the given start to end on the provided
. Since the path is complete, it will either be null, or terminate at the given end.
world | the world on which the path is calculated |
posX | the x value of the start |
posY | the y value of the start |
endX | the x value of the end |
endY | the y value of the end |