From 85855f00ff99be42ff86f082660216cf3d3ab788 Mon Sep 17 00:00:00 2001 From: wisplite Date: Thu, 14 May 2026 09:14:02 -0500 Subject: [PATCH] whoops, we should reset the grid to clear the closedSet, openSet, and scores --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index bb758c8..5106546 100644 --- a/main.go +++ b/main.go @@ -262,6 +262,7 @@ func main() { // Calculate Path Button if rg.Button(rl.NewRectangle(sidebarX+(10*scale), (screenHeight-(40*scale)), (180*scale), (30*scale)), "Calculate Path") { + astar.ResetGrid() path := astar.CalculatePath(int(startPos.X), int(startPos.Y), int(endPos.X), int(endPos.Y)) fmt.Println(path) for _, p := range path {