public override double CalculateCosts(AStar.Node n) { var node = n as CPHNode; double xDiff = node.Point.X - Point.X; double yDiff = node.Point.Y - Point.Y; return(Math.Sqrt(xDiff * xDiff + yDiff * yDiff)); }
public override bool IsGoalState(AStar.Node n) { return(Equals(n)); }
} // It costs nothing to move. public override bool IsGoalState(AStar.Node n) { return(Clause.GetLength() == 0); }
public override double CalculateCosts(AStar.Node n) { return(0); } // It costs nothing to move.