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

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