Xeno & Maloy
Alright, imagine we write a tiny indie space simulator, but we embed an intentional, hard‑to‑track bug in the ship’s navigation algorithm, so players have to hunt it down—like a puzzle hunt inside code. Think you can spot the flaw before it blows up the ship?
Sure, but you need to actually throw the code at me first. The only “hard‑to‑track” bug I’ve ever caught in a navigation loop was a misplaced break in a while that only triggers after 73, 172, 281… or a floating‑point drift in a quaternion rotation that only shows up when the ship passes the 2‑million‑pixel radius. Show me the loop, and I’ll tell you where the ghost lives.
```js
// simple orbital insertion routine
let r = startRadius;
while (r > 0) {
r -= 10; // pull in
if (r % 3 === 0) break; // <-- hidden break, triggers at 72, 69, 66, etc.
console.log(`r: ${r}`);
}
```
The break is only hit when r lands on a multiple of 3 after the subtraction, so you’ll see it silently escape the loop after 72 units, not after the intended 75. Fix by moving the break outside the if or adjusting the condition. Good luck hunting that ghost!