ai-22 / src / am / aua / search / AStarFunction.java
AStarFunction.java
Raw
package am.aua.search;

public class AStarFunction implements NodeFunction {
    private NodeFunction heuristicFunction;

    public AStarFunction(NodeFunction heuristicFunction) {
       this.heuristicFunction = heuristicFunction;
    }

    @Override
    public int eval(Node n) {
        return heuristicFunction.eval(n) + n.pathCost;
    }
}