A Rail Pathfinder.
More...
Public Member Functions |
function | InitializePath (sources, goals, ignored_tiles=[]) |
| Initialize a path search between sources and goals.
|
function | FindPath (iterations) |
| Try to find the path as indicated with InitializePath with the lowest cost.
|
Public Attributes |
| cost = null |
| Used to change the costs.
|
Detailed Description
Member Function Documentation
function Rail::FindPath |
( |
iterations |
| ) |
|
Try to find the path as indicated with InitializePath with the lowest cost.
- Parameters
-
iterations | After how many iterations it should abort for a moment. This value should either be -1 for infinite, or > 0. Any other value aborts immediatly and will never find a path. |
- Returns
- A route if one was found, or false if the amount of iterations was reached, or null if no path was found. You can call this function over and over as long as it returns false, which is an indication it is not yet done looking for a route.
- See Also
- AyStar::FindPath()
function Rail::InitializePath |
( |
sources |
, |
|
|
goals |
, |
|
|
ignored_tiles |
= [] |
|
) |
| |
|
inline |
Initialize a path search between sources and goals.
- Parameters
-
sources | The source tiles. |
goals | The target tiles. |
ignored_tiles | An array of tiles that cannot occur in the final path. |
- See Also
- AyStar::InitializePath()
The documentation for this class was generated from the following file: