| Package | Description |
|---|---|
| fr.arakne.utils.maps.path |
| Modifier and Type | Method and Description |
|---|---|
Pathfinder<C> |
Pathfinder.addFirstCell(boolean addFirstCell)
Does the first cell (source) should be added to the path ?
|
Pathfinder<C> |
Pathfinder.cellWeightFunction(Function<C,Integer> function)
Define the function for compute the cell cost
This function can add penalty on some cells.
|
Pathfinder<C> |
Pathfinder.directions(Direction[] directions)
Define the available movements directions
Note : Adding all directions will permit to move in diagonal,
But the pathfinder is not optimal, because the distance is not computed using pythagoras distance
By default, the direction are the restricted directions
|
Pathfinder<C> |
Pathfinder.exploredCellLimit(@Positive int limit)
Define the maximum number of cells to explore before fail
A lower limit will fail faster, but do not permit complex path
The limit cannot be higher than walkable cells number
|
Pathfinder<C> |
Decoder.pathfinder()
Get the pathfinder related to this decoder
|
Pathfinder<C> |
Pathfinder.targetDistance(@NonNegative int distance)
Define the minimal target distance to consider the path as reached
A distance of 0 means that the end of the path must be the target cell
A distance of 1 means that the end of the path must be an adjacent cell of the target
By default the value is 0 (the end must be the target)
|
Pathfinder<C> |
Pathfinder.walkablePredicate(Predicate<C> predicate)
Define the predicate for check if the cell is walkable
By default the predicate will call
MapCell.walkable() |
Copyright © 2022. All rights reserved.