mirror of
https://github.com/wisplite/a-star-go.git
synced 2026-06-27 15:37:07 -05:00
whoops, we should reset the grid to clear the closedSet, openSet, and scores
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user