migrating all util files from js to ts

This commit is contained in:
Marc Emmanuel 2026-01-14 09:18:08 +01:00
parent 76f86497c7
commit fa493989b6
39 changed files with 3174 additions and 1523 deletions

View file

@ -271,7 +271,7 @@ window.Military = (function () {
}
if (node.t > expected) return;
const r = (expected - node.t) / (node.s ? 40 : 20); // search radius
const candidates = tree.findAll(node.x, node.y, r);
const candidates = findAllInQuadtree(node.x, node.y, r, tree);
for (const c of candidates) {
if (c.t < expected && mergeable(node, c)) {
merge(node, c);