public class AStarNode extends Object
| Constructor and Description |
|---|
AStarNode(int x,
int y,
NodeState state)
Constructs A* node with x, y values and state.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getFCost() |
int |
getGCost() |
int |
getHCost() |
AStarNode |
getParent() |
NodeState |
getState() |
Object |
getUserData() |
int |
getX() |
int |
getY() |
void |
setHCost(int hCost)
Set H cost.
|
void |
setParent(AStarNode parent)
Set node's parent.
|
void |
setState(NodeState state)
Set node's state.
|
void |
setUserData(Object userData)
Set user specific data.
|
String |
toString() |
public AStarNode(int x,
int y,
NodeState state)
x - x valuey - y valuestate - initial statepublic final void setUserData(Object userData)
userData - datapublic final Object getUserData()
public final void setParent(AStarNode parent)
parent - parent nodepublic final AStarNode getParent()
public final void setHCost(int hCost)
hCost - H costpublic final int getHCost()
public final int getGCost()
public final int getX()
public final int getY()
public final void setState(NodeState state)
state - the statepublic final NodeState getState()
public final int getFCost()
Copyright © 2017. All rights reserved.