From ea904845a7a73c1b8574b41b42897ee521849421 Mon Sep 17 00:00:00 2001 From: Simon O'Shea Date: Wed, 9 Aug 2023 08:56:20 -0400 Subject: ASTAR WORKS WITH H0 AAAAAAAAAAAAAAAAAAAAAJHH --- Pathfinding Visualizer/Assets/Scripts/PathNode.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Pathfinding Visualizer/Assets/Scripts/PathNode.cs') 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 + 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 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 +*//* class NodeComparator : Comparer { // 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 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; } - } + }*/ -- cgit v1.3.1-4-g156e