public final class Node extends Object implements Comparable<Node>
Constructor and Description |
---|
Node(int x,
int y)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Node other) |
boolean |
equals(Object object) |
double |
getCost()
Get cost.
|
int |
getDepth()
Get node depth.
|
double |
getHeuristic()
Get heuristic value.
|
Node |
getParent()
Get node parent reference.
|
int |
getX()
Get location x.
|
int |
getY()
Get location y.
|
int |
hashCode() |
void |
setCost(double cost)
Set cost.
|
void |
setDepth(int depth)
Set node depth.
|
void |
setHeuristic(double heuristic)
Set heuristic value.
|
int |
setParent(Node parent)
Set the node parent.
|
void |
setX(int x)
Set location x.
|
void |
setY(int y)
Set location y.
|
public Node(int x, int y)
x
- The location x.y
- The location y.public int setParent(Node parent)
parent
- The node parent.public void setX(int x)
x
- The location x.public void setY(int y)
y
- The location y.public void setCost(double cost)
cost
- The node cost.public void setHeuristic(double heuristic)
heuristic
- The heuristic value.public void setDepth(int depth)
depth
- The node depth.public int getX()
public int getY()
public double getCost()
public Node getParent()
public double getHeuristic()
public int getDepth()
public int compareTo(Node other)
compareTo
in interface Comparable<Node>
Copyright © 2016 Byron 3D Games Studio. All rights reserved.