|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.pathfinding.NodeFourWay
public class NodeFourWay
Title: NodeFourWay
Description: TODO
Copyright: Copyright (c) Feb 11, 2012
Constructor Summary | |
---|---|
NodeFourWay(int xLocation,
int yLocation)
|
Method Summary | |
---|---|
void |
addNode(Node node,
int distance,
java.util.List<java.lang.String> path)
Add a connecting Node that is X distance away, with a path containing points. |
void |
clear()
|
NodeLink |
getConnectionFromLocation(int x,
int y)
Gets the NodeLink that contains the given location. |
java.util.List<NodeLink> |
getConnections()
Returns the connection nodes with distance to that node. |
int |
getDistanceFromStart()
Used by pathfinding, the total distance from the start. |
GameLocation |
getGameLocation()
The location of this node as a tile location. |
java.lang.String |
getLocationKey()
Returns the Location as a String. |
Node |
getPathParent()
Used by pathfinding, gets the node traveled through to get to this node. |
void |
setDistanceFromStart(int distanceFromStart)
Used by pathfinding, sets the total distance from the start. |
void |
setPathParent(Node node)
Used by pathfinding, sets the node traveled through to get to this node. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NodeFourWay(int xLocation, int yLocation)
Method Detail |
---|
public void addNode(Node node, int distance, java.util.List<java.lang.String> path)
Node
addNode
in interface Node
node
- distance
- path
- public void clear()
clear
in interface Node
public java.util.List<NodeLink> getConnections()
Node
getConnections
in interface Node
public NodeLink getConnectionFromLocation(int x, int y)
Node
getConnectionFromLocation
in interface Node
public int getDistanceFromStart()
Node
getDistanceFromStart
in interface Node
public GameLocation getGameLocation()
Node
getGameLocation
in interface Node
public java.lang.String getLocationKey()
Node
getLocationKey
in interface Node
public Node getPathParent()
Node
getPathParent
in interface Node
public void setDistanceFromStart(int distanceFromStart)
Node
setDistanceFromStart
in interface Node
public void setPathParent(Node node)
Node
setPathParent
in interface Node
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |