|
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 (const PathWorld *) | |
| bool | path (size_t, size_t, size_t, size_t, Character *, path_t &) |
Find a path between two points in a world.
see LICENSE
| PathFinder::PathFinder | ( | const PathWorld * | world | ) |
Initialise the path finder.
| world | pointer to world object |
| bool PathFinder::path | ( | size_t | r1, |
| size_t | c1, | ||
| size_t | r2, | ||
| size_t | c2, | ||
| Character * | ignore, | ||
| path_t & | p | ||
| ) |
BFS to find a path.
| r1 | initial row |
| c1 | initial column |
| r2 | final row |
| c2 | final column |
| ignore | character to ignore |
| p | reference to a path to be filled with data |
1.7.4