uk.ac.ed.inf.sdp2012.group7.strategy.oldastar
Class OldPath

java.lang.Object
  extended by uk.ac.ed.inf.sdp2012.group7.strategy.oldastar.OldPath

public class OldPath
extends java.lang.Object


Constructor Summary
OldPath()
           
 
Method Summary
 void appendWayPoint(OldNode n)
          Append a waypoint to the path.
 boolean contains(int x, int y)
          Check if this path contains the WayPoint
 int getLength()
           
 OldNode getWayPoint(int index)
           
 java.util.ArrayList<OldNode> getWayPoints()
           
 int getX(int index)
          Get the x-coordinate for the waypoint at the given index.
 int getY(int index)
          Get the y-coordinate for the waypoint at the given index.
 java.util.ArrayList<java.awt.Point> pathToPoints()
           
 void prependWayPoint(OldNode n)
          Add a waypoint to the beginning of the path.
 void printWaypoints()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldPath

public OldPath()
Method Detail

getWayPoints

public java.util.ArrayList<OldNode> getWayPoints()

getLength

public int getLength()

getWayPoint

public OldNode getWayPoint(int index)

getX

public int getX(int index)
Get the x-coordinate for the waypoint at the given index.

Parameters:
index - The index of the waypoint to get the x-coordinate of.
Returns:
The x coordinate at the waypoint.

getY

public int getY(int index)
Get the y-coordinate for the waypoint at the given index.

Parameters:
index - The index of the waypoint to get the y-coordinate of.
Returns:
The y coordinate at the waypoint.

appendWayPoint

public void appendWayPoint(OldNode n)
Append a waypoint to the path.

Parameters:
x - The x coordinate of the waypoint.
y - The y coordinate of the waypoint.

prependWayPoint

public void prependWayPoint(OldNode n)
Add a waypoint to the beginning of the path.

Parameters:
x - The x coordinate of the waypoint.
y - The y coordinate of the waypoint.

contains

public boolean contains(int x,
                        int y)
Check if this path contains the WayPoint

Parameters:
x - The x coordinate of the waypoint.
y - The y coordinate of the waypoint.
Returns:
True if the path contains the waypoint.

pathToPoints

public java.util.ArrayList<java.awt.Point> pathToPoints()

printWaypoints

public void printWaypoints()