AlgorithmTest
Class AStar

java.lang.Object
  extended by AlgorithmTest.SearchAlgorithm
      extended by AlgorithmTest.AStar

public class AStar
extends SearchAlgorithm


Field Summary
static int DIAGONAL
           
static int EUCLIDEAN
           
protected  AlgorithmTest m_Applet
           
protected  int m_costEstimate
           
protected  java.util.Vector m_Path
           
static int MANHATTAN
           
static int MAX_DX_DY
           
 
Constructor Summary
AStar(int TilesX, int TilesY, AlgorithmTest theApplet)
           
 
Method Summary
protected  int CalcEstimate(Node Start, Node Finish)
          Calculates the estimated cost of going from Node Start to Node Finish
 java.util.Vector findPath(java.util.Vector Scene, Node start, Node finish)
           
 void setCost(int cost)
           
 void setFunction(int function)
           
 void setWait(int wait)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DX_DY

public static final int MAX_DX_DY
See Also:
Constant Field Values

EUCLIDEAN

public static final int EUCLIDEAN
See Also:
Constant Field Values

DIAGONAL

public static final int DIAGONAL
See Also:
Constant Field Values

MANHATTAN

public static final int MANHATTAN
See Also:
Constant Field Values

m_Applet

protected AlgorithmTest m_Applet

m_costEstimate

protected int m_costEstimate

m_Path

protected java.util.Vector m_Path
Constructor Detail

AStar

public AStar(int TilesX,
             int TilesY,
             AlgorithmTest theApplet)
Method Detail

setCost

public void setCost(int cost)
Specified by:
setCost in class SearchAlgorithm

setFunction

public void setFunction(int function)
Specified by:
setFunction in class SearchAlgorithm

setWait

public void setWait(int wait)
Specified by:
setWait in class SearchAlgorithm

findPath

public java.util.Vector findPath(java.util.Vector Scene,
                                 Node start,
                                 Node finish)
Specified by:
findPath in class SearchAlgorithm

CalcEstimate

protected int CalcEstimate(Node Start,
                           Node Finish)
Calculates the estimated cost of going from Node Start to Node Finish