summaryrefslogtreecommitdiff
path: root/Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs')
-rw-r--r--Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs b/Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs
index a3fe8e0..212d6d2 100644
--- a/Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs
+++ b/Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs
@@ -67,6 +67,7 @@ public class Pathfinder
for(int i = 0; i < result.Count; i++)
{
Node n = result[i];
+ Debug.Log("Agent at: " + n.agent.x + ", " + n.agent.y);
Debug.Log(n.lastMove);
}
}
@@ -79,9 +80,6 @@ public class Pathfinder
List<Node> open = new List<Node>();
-
- //PriorityQueue<Node> open = new PriorityQueue<Node>();
-
open.Add(initialState);
int cap = 1000;
while (true && cap > 0)
@@ -100,7 +98,6 @@ public class Pathfinder
{
while (currentNode.parent != null)
{
- Debug.Log("Agent at: " + currentNode.agent.x + ", " + currentNode.agent.y);
solution.Add(currentNode);
currentNode = currentNode.parent;
}
@@ -139,7 +136,7 @@ public class Pathfinder
sorted.Add(children[i]);
}
- sorted = sorted.OrderBy(Node => Node.fn).ToList();
+ //sorted = sorted.OrderBy(Node => Node.fn).ToList();
return sorted;
}