|
|
|
|
|
by squeaky-clean
1316 days ago
|
|
Think I found it, if you change the sort in astar.ts to just return 1 or -1 based on the comparison it behaves like A-star. untraversedTiles.sort((a, b) => {
if (heuristicCost[a.row][a.col] < heuristicCost[b.row][b.col]) {
return-1;
}
return 1;
});
|
|