Example #1
0
            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));
            }
Example #2
0
 public override bool IsGoalState(AStar.Node n)
 {
     return(Equals(n));
 }
Example #3
0
            }                                                                 // It costs nothing to move.

            public override bool IsGoalState(AStar.Node n)
            {
                return(Clause.GetLength() == 0);
            }
Example #4
0
 public override double CalculateCosts(AStar.Node n)
 {
     return(0);
 }                                                                 // It costs nothing to move.