Package net.citizensnpcs.api.astar
Interface AStarGoal<T extends AStarNode>
- All Known Implementing Classes:
VectorGoal
public interface AStarGoal<T extends AStarNode>
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the cost of moving between the two suppliedAStarNode
s.float
getInitialCost
(T node) Returns the initial cost value when starting from the suppliedAStarNode
.float
Returns the estimated heuristic cost of traversing from the suppliedAStarNode
to the goal.boolean
isFinished
(T node) Returns whether the suppliedAStarNode
represents the goal state for thisAStarGoal
.
-
Method Details
-
g
Returns the cost of moving between the two suppliedAStarNode
s.- Parameters:
from
- The node to start fromto
- The end node- Returns:
- The cost
-
getInitialCost
Returns the initial cost value when starting from the suppliedAStarNode
. This represents an initial estimate for reaching the goal state from the start node.- Parameters:
node
- The start node- Returns:
- The initial cost
-
h
Returns the estimated heuristic cost of traversing from the suppliedAStarNode
to the goal.- Parameters:
from
- The start node- Returns:
- The heuristic cost
-
isFinished
Returns whether the suppliedAStarNode
represents the goal state for thisAStarGoal
. This will halt execution of the callingAStarMachine
.- Parameters:
node
- The node to check- Returns:
- Whether the node is the goal state
-