diff --git a/Graph/DirectedMultiGraph.cs b/Graph/DirectedMultiGraph.cs index ed22993..1890a83 100644 --- a/Graph/DirectedMultiGraph.cs +++ b/Graph/DirectedMultiGraph.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; - namespace MoonTools.Core.Graph { public class DirectedMultiGraph : MultiGraph where TNode : System.IEquatable diff --git a/Graph/DirectedWeightedMultiGraph.cs b/Graph/DirectedWeightedMultiGraph.cs index 1fbe524..06974fe 100644 --- a/Graph/DirectedWeightedMultiGraph.cs +++ b/Graph/DirectedWeightedMultiGraph.cs @@ -63,7 +63,7 @@ namespace MoonTools.Core.Graph gScore[start] = 0; fScore[start] = heuristic(start, end); - while (openSet.Any()) + while (openSet.Count > 0) { var currentNode = openSet.MinBy(node => fScore[node]).First();