Example #1
0
 ///<summary>Creates a path from the ending node to its first parent</summary>
 /// <param name="endingNode">Ending node to trace a path using its parents</param>
 ///<returns>Returns a path from the starting node to the ending node</returns>
 private Path retracePath(Node endingNode)
 {
     Path path = new Path();
     path.AppendNode(endingNode);
     while (endingNode.Parent != null)
     {
         endingNode = endingNode.Parent;
         path.AppendNode(endingNode);
     }
     path.ReversePath();
     return path;
 }