protected double getSimpleHeuristicCost(double x, double g, double dFactor) {
        double dx = Math.abs(x - g);
        return dFactor * (dx);
    }
protected double getSimpleHeuristicCost ( double x , double g , double dFactor ) { double dx = Math . abs ( x - g ) ; return dFactor * ( dx ) ; }
obtains from http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html