04 A small diversion

Bug Hunt

Five bugs. Twenty-four turns. A tiny debugging detour: find a route through the codebase and patch the queue.

Patch the queue

Move one cell at a time. Face a numbered bug, then patch it for 10 points. Moves and patch attempts use one turn; bumping into a wall or bug is free. Patch all five to win.

Score
0 / 50
Turns left
24 / 24
Patched
0 / 5

Saved board preview. Start the game when you’re ready; there is no timer.

Row 5, column 1 · Facing right
Ahead: clear space

Use the buttons, or focus the board for arrow keys and WASD. Space or Enter patches. Nothing moves between actions.

How it works

Rust keeps the rules

Movement, walls, bug collisions, scoring, and the turn budget live in one small Rust model. Every action returns a board snapshot; restarting restores the same state.

The browser makes it playable

React draws ordinary HTML cells and buttons, maps keyboard and touch input to actions, and announces results. The board, bug positions, walls, and instructions are readable without canvas.

Why Rust/WASM here?

A bounded game state makes a clear boundary: Rust decides what happens; JavaScript presents it. This is a small experiment in that separation, not a claim that a tiny game needs WASM for speed.

A quiet fallback

The optional game loads only when you start. If JavaScript or WebAssembly is unavailable, the saved board and rules remain. Reduced motion keeps the same turn-by-turn play, with no animated movement.

Read the Rust game on GitHub Gist →

← Back to the Workshop