diff --git a/ShortestTotalPath/Program.cs b/ShortestTotalPath/Program.cs index 25906f7..e10ba1f 100644 --- a/ShortestTotalPath/Program.cs +++ b/ShortestTotalPath/Program.cs @@ -62,8 +62,9 @@ namespace ShortestTotalPath Console.Write(" -> "); } } + } - + Console.WriteLine("Finished"); Console.ReadLine(); } @@ -134,7 +135,7 @@ namespace ShortestTotalPath double length = poppedNode.TotalTraversedLength + poppedNode.Children[child]; Node qNode = new(child, poppedNode, length); // A admissible (never over-estimates) heuristic is largest distance to an un-traversed node from our current node. - qNode.LocalHeuristic = poppedNode.FarthestUnvisitedNodeDistance(); + qNode.LocalHeuristic = qNode.FarthestUnvisitedNodeDistance(); // Add the node to the queue queue.Add(qNode, length); }