Closed akuskis closed 4 years ago
Fix for #440
Thanks for the fix!
Just some trivia, in the original game, if A and B were not aligned on either x or y the path would first move diagonally until they align. This appears to be down to the order the A* implementation looks at different directions on the grid:
-1,-1 = NW
-1, 1 = SW
1,-1 = SE
1, 1 = NW
-1, 0 = W
0,-1 = N
1, 0 = E
0, 1 = S
. . B . .
. . ^ . .
. . ^ . .
. . ^ . .
. . ^ . .
. . . A .
Hi @wheybags , please review.
Fixed bug in heuristic.
Before:
After: