org.deken.game.pathfinding
Class NodeLink
java.lang.Object
org.deken.game.pathfinding.NodeLink
- All Implemented Interfaces:
- java.lang.Comparable<NodeLink>
public class NodeLink
- extends java.lang.Object
- implements java.lang.Comparable<NodeLink>
Title: NodeLink
Description: A connect between two nodes. Storing the distance, in Tiles,
between the two nodes. The Path, tiles from one the other.
Copyright: Copyright (c) Feb 11, 2012
- Version:
- 1.0
- Author:
- Gary Deken
Constructor Summary |
NodeLink(Node node,
int distance,
java.util.List<java.lang.String> path)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeLink
public NodeLink(Node node,
int distance,
java.util.List<java.lang.String> path)
getDistance
public int getDistance()
getNode
public Node getNode()
getPath
public java.util.List<java.lang.String> getPath()
isOnPath
public boolean isOnPath(int x,
int y)
getDistanceOnPath
public int getDistanceOnPath(int x,
int y)
getFirstPosition
public GameLocation getFirstPosition()
getLocation
public GameLocation getLocation(int index)
compareTo
public int compareTo(NodeLink other)
- Specified by:
compareTo
in interface java.lang.Comparable<NodeLink>