From b3b4dacf192b5e0d46106598d98ccb9687ccf662 Mon Sep 17 00:00:00 2001 From: Simon O'Shea Date: Wed, 9 Aug 2023 11:39:18 -0400 Subject: things have been optimized, time for DFS --- Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/nMain.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Pathfinding Visualizer/Assets/UI Elements') diff --git a/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/nMain.cs b/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/nMain.cs index f6bb494..10d2dc9 100644 --- a/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/nMain.cs +++ b/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/nMain.cs @@ -20,8 +20,8 @@ public class nMain : MonoBehaviour // Coordinates for pathfinding public Vector2Int agent = new Vector2Int(); - public List obstacles = new List(); - public List samples = new List(); + public HashSet obstacles = new HashSet(); + public HashSet samples = new HashSet(); // Start is called before the first frame update void Start() @@ -108,8 +108,8 @@ public class nMain : MonoBehaviour { world.reset(); agent = new Vector2Int(); - obstacles = new List(); - samples = new List(); + obstacles = new HashSet(); + samples = new HashSet(); } public void StartAlgorithm() -- cgit v1.3.1-4-g156e