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
Hi, I can confirm this issue, I couldn't reproduce it using a small graph. adding @BonsaiDen fix resolves the issue, sample code:
var graph = new Graph([
[1,1,1,1],
[1,0,1,0],
[0,0,1,1]
]);
var start = graph.grid[0][0];
var end = graph.grid[1][2];
var result = astar.search(graph, start, end);
console.log(result);
result = astar.search(graph, end, start);
console.log(result);
Adding a
graph.markDirty(start);
right infront of thewhile
loop in thesearch
function seems to fix this.The text was updated successfully, but these errors were encountered: