Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
val antonini committed Apr 28, 2024
1 parent 8f3e409 commit 7ac71d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion astar.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (p Pathfinder) Find(start, end Vec2) []Vec2 {
}

successor.parent = &q
successor.g = q.g + manhattan(qPos, successor.pos)
successor.g = q.g + manhattan(qPos, succPos)
successor.h = manhattan(succPos, end)
successor.f = successor.g + successor.h
successor.open = true
Expand Down

0 comments on commit 7ac71d5

Please sign in to comment.