uk.ac.ed.inf.sdp2012.group7.strategy.astar
Class ClosestHeuristic

java.lang.Object
  extended by uk.ac.ed.inf.sdp2012.group7.strategy.astar.ClosestHeuristic
All Implemented Interfaces:
AStarHeuristic

public class ClosestHeuristic
extends java.lang.Object
implements AStarHeuristic


Constructor Summary
ClosestHeuristic()
           
 
Method Summary
 double getEstimatedDistanceToGoal(Node a, Node b)
          The heuristic tries to guess how far a given Node is from the goal Node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClosestHeuristic

public ClosestHeuristic()
Method Detail

getEstimatedDistanceToGoal

public double getEstimatedDistanceToGoal(Node a,
                                         Node b)
Description copied from interface: AStarHeuristic
The heuristic tries to guess how far a given Node is from the goal Node. The lower the cost, the more likely a Node will be searched next.

Specified by:
getEstimatedDistanceToGoal in interface AStarHeuristic
Returns:
The cost associated with the given tile