mirror of
https://github.com/Baipyrus/AoC-23.git
synced 2024-12-26 12:01:45 +00:00
d10 optimizations
This commit is contained in:
parent
ec608aae63
commit
eb0abaec30
@ -73,8 +73,8 @@ while (open.length > 0) {
|
|||||||
y: ny,
|
y: ny,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!relPos(bends[symbol], -i, -j)) continue;
|
|
||||||
if (closed.some((e) => compare(e, next))) continue;
|
if (closed.some((e) => compare(e, next))) continue;
|
||||||
|
if (!relPos(bends[symbol], -i, -j)) continue;
|
||||||
|
|
||||||
open.push(next);
|
open.push(next);
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,8 @@ while (open.length > 0) {
|
|||||||
y: ny,
|
y: ny,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!relPos(bends[symbol], -i, -j)) continue;
|
|
||||||
if (closed.some((e) => compare(e, next))) continue;
|
if (closed.some((e) => compare(e, next))) continue;
|
||||||
|
if (!relPos(bends[symbol], -i, -j)) continue;
|
||||||
|
|
||||||
open.push(next);
|
open.push(next);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user