This commit is contained in:
nim-ka
2022-10-29 02:47:26 +00:00
parent 053fced524
commit 1c7aaa8fd5
4 changed files with 28 additions and 20 deletions

View File

@@ -62,7 +62,7 @@ class Node {
return path
}
dijkstra(dests) {
dijkstraTo(dests) {
if (!Array.isArray(dests)) {
dests = [dests]
}
@@ -120,13 +120,13 @@ class Node {
}
})
if (i++ % 1000 == 0) {
if (++i % 1000 == 0) {
console.log(heap.data.length)
}
}
console.timeEnd("search")
console.warn("Node.dijkstra: Could not find a path")
console.warn("Node.dijkstraTo: Could not find a path")
}
}