You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried with and without diagonal option defined and same result. When I run the pathfinder method it works twice returning expected results in an array. When I run it for a third time, it returns an empty object. Strange. http://jsfiddle.net/ccarterc1984/5ABHL/
The text was updated successfully, but these errors were encountered:
In your code, the gridBackup is dirty when the findThePath function is called for the second time. So the subsequent calls to findThePath will not return the correct answer.
To correct it, you should make a clone of the grid every time before the pathfinding. See Line 17 of my modified version: http://jsfiddle.net/UYyQM/1/
In your code, the gridBackup is dirty when the findThePath function is
called for the second time. So the subsequent calls to findThePath will
not return the correct answer.
To correct it, you should make a clone of the grid every time before
the pathfinding. See Line 17 of my modified version: http://jsfiddle.net/UYyQM/1/
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-18317919
.
Tried with and without diagonal option defined and same result. When I run the pathfinder method it works twice returning expected results in an array. When I run it for a third time, it returns an empty object. Strange. http://jsfiddle.net/ccarterc1984/5ABHL/
The text was updated successfully, but these errors were encountered: