public class AshManhattan extends java.lang.Object implements AstarHeuristic
|x1 - x2| + |y1 - y2| + |z1 - z2|
Constructor and Description |
---|
AshManhattan()
Will use a factor of 1.0 to calculate the estimated cost
between nodes
|
AshManhattan(double factor)
Create the heuristic.
|
Modifier and Type | Method and Description |
---|---|
double |
getCost(GraphNode node,
GraphNode target)
Estimate the cost between the node and the target.
|
public AshManhattan()
public AshManhattan(double factor)
factor
- scaling factorpublic double getCost(GraphNode node, GraphNode target)
getCost
in interface AstarHeuristic
Processing library AI_for_2D_Games by Peter Lager. (C) 2013