duncan
Mom and Dad were wrong!
Public Types | Public Member Functions
client::PathFinder Class Reference

#include <pathfinder.h>

Collaboration diagram for client::PathFinder:
Collaboration graph
[legend]

List of all members.

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 &)

Detailed Description

Find a path between two points in a world.

Author:
Harry Slatyer

see LICENSE


Constructor & Destructor Documentation

PathFinder::PathFinder ( World world)

Initialise the path finder.

Parameters:
worldreference to world object

Member Function Documentation

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.

Parameters:
r1initial row
c1initial column
r2final row
c2final column
ignoreindex of character to ignore
preference to a path to be filled with data
Returns:
whether or not there exists a path from (r1,c1) to (r2,c2)

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations