duncan
Mom and Dad were wrong!
|
#include <pathfinder.h>
Public Types | |
typedef std::list< std::pair < size_t, size_t > > | path_t |
Public Member Functions | |
PathFinder (World &) | |
bool | path (size_t, size_t, size_t, size_t, net::index_t, path_t &) |
Find a path between two points in a world.
see LICENSE
PathFinder::PathFinder | ( | World & | world | ) |
Initialise the path finder.
world | reference to world object |
bool PathFinder::path | ( | size_t | r1, |
size_t | c1, | ||
size_t | r2, | ||
size_t | c2, | ||
net::index_t | ignore, | ||
path_t & | p | ||
) |
BFS to find a path.
r1 | initial row |
c1 | initial column |
r2 | final row |
c2 | final column |
ignore | index of character to ignore |
p | reference to a path to be filled with data |