public class GridNode extends AbstractPathfinderNode
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
traversable
Holds the state of whether the node is an obstruction or walkable area
|
g, h, location, parent| Constructor and Description |
|---|
GridNode(int x,
int y,
int z,
boolean traversable)
Class constructor taking in x, y, and z coordinates to set the location.
|
GridNode(RectCoordinates location,
boolean traversable)
Class constructor taking in a RectCoordinates object to set the location.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
TODO: Should we check other things?
|
boolean |
isTraversable()
Access method to determine if the node is traversable or not.
|
java.lang.String |
toString()
Returns a formatted String holding the location of the node.
|
compareTo, getG, getH, getLocation, getParent, setG, setH, setParentprotected boolean traversable
public GridNode(int x,
int y,
int z,
boolean traversable)
x - the column the node is located in the gridy - the row the node is located in the gridz - the aisle the node is located in the gridtraversable - determines whether the node can be traversed throughpublic GridNode(RectCoordinates location, boolean traversable)
location - the index of the node in the gridtraversable - determines whether the node can be traversed throughpublic boolean isTraversable()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
AbstractPathfinderNodetoString in class AbstractPathfinderNode