Class AStarPathfinding
Implementation class for the A* Pathfinding algorithm.
This algorith takes an admissible heuristic, and uses it to find the shortest path
Inheritance
System.Object
AStarPathfinding
Assembly: Sylves.dll
Syntax
public class AStarPathfinding : Object
Constructors
AStarPathfinding(IGrid, Cell, Func<Step, Nullable<Single>>, Func<Cell, Single>)
Declaration
public AStarPathfinding(IGrid grid, Cell src, Func<Step, Nullable<float>> stepLengths, Func<Cell, float> heuristic)
Parameters
Type |
Name |
Description |
IGrid |
grid |
|
Cell |
src |
|
System.Func<Step, System.Nullable<System.Single>> |
stepLengths |
|
System.Func<Cell, System.Single> |
heuristic |
|
Methods
Declaration
public CellPath ExtractPathTo(Cell target)
Parameters
Type |
Name |
Description |
Cell |
target |
|
Returns
Run(Cell)
Declaration
public void Run(Cell target)
Parameters
Type |
Name |
Description |
Cell |
target |
|