diff options
| author | Simon O'Shea <osheas1@wit.edu> | 2023-08-09 08:56:20 -0400 |
|---|---|---|
| committer | Simon O'Shea <osheas1@wit.edu> | 2023-08-09 08:56:20 -0400 |
| commit | ea904845a7a73c1b8574b41b42897ee521849421 (patch) | |
| tree | 9895f8ba1a560c6e352cac4b0478e34052a7092f /Pathfinding Visualizer/Assets/Scripts/PathNode.cs | |
| parent | ce148072ef18fb0b33b0c9f3bef5629601f1d48f (diff) | |
ASTAR WORKS WITH H0
AAAAAAAAAAAAAAAAAAAAAJHH
Diffstat (limited to 'Pathfinding Visualizer/Assets/Scripts/PathNode.cs')
| -rw-r--r-- | Pathfinding Visualizer/Assets/Scripts/PathNode.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Pathfinding Visualizer/Assets/Scripts/PathNode.cs b/Pathfinding Visualizer/Assets/Scripts/PathNode.cs index c69e821..857886e 100644 --- a/Pathfinding Visualizer/Assets/Scripts/PathNode.cs +++ b/Pathfinding Visualizer/Assets/Scripts/PathNode.cs @@ -1,10 +1,10 @@ -using System; +/*using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; - public class Node //: IComparable<Node> + public class Node { // helper variables just to make indexing arrays easier to read public static int row = 0; @@ -13,6 +13,7 @@ using UnityEngine; public Node parent; public Vector2Int agent; public List<Vector2Int> samples; + public char lastMove; // for output/animation public int distanceTraveled; // for calculating f(n) value public double heuristic; @@ -194,18 +195,18 @@ using UnityEngine; } // we use to override comparisons for priorityQueues so that our heuristic calculations are actually used -/* public int CompareTo(Node other) +*//* public int CompareTo(Node other) { if (this.fn > other.fn) return 1; else return -1; - }*/ + }*//* } // helper class for Node -/* class NodeComparator : Comparer<Node> +*//* class NodeComparator : Comparer<Node> { // used to sort nodes based on sum of distance traveled + heuristic estimation of work left public override int Compare(Node a, Node b) @@ -215,7 +216,7 @@ using UnityEngine; else return -1; } - }*/ + }*//* // helper class for Node public class State { @@ -228,10 +229,10 @@ using UnityEngine; this.samples = samples; // convert List<int[]> into 2D array of ints [][] - /*for (int i = 0; i < samples.Count; i++) + *//*for (int i = 0; i < samples.Count; i++) { this.samples[i] = samples[i]; - }*/ + }*//* } public bool inClosed() @@ -264,4 +265,4 @@ using UnityEngine; return true; } - } + }*/ |
