diff options
| author | Simon O'Shea <osheas1@wit.edu> | 2023-08-08 19:27:43 -0400 |
|---|---|---|
| committer | Simon O'Shea <osheas1@wit.edu> | 2023-08-08 19:27:43 -0400 |
| commit | 8507bec1bc4a359efa462ffac2d3e7fb8adbe32d (patch) | |
| tree | 7ce6b94b8e8bcc7e4156a69d6c5554af17377a28 /Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs | |
| parent | f347e50d11d7bf4bba0260dec88249eda608637e (diff) | |
still trying to fix astar
Diffstat (limited to 'Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs')
| -rw-r--r-- | Pathfinding Visualizer/Assets/Scripts/Pathfinder.cs | 7 |
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; } |
