Conway's Game of Life · kat-coder-air-v2.5
Run Conway's Game of Life on a full-screen canvas grid with click-and-drag to toggle cells, plus play/pause, step, randomize, and clear controls.
transcript · 10 messages
Run Conway's Game of Life on a full-screen canvas grid with click-and-drag to toggle cells, plus play/pause, step, randomize, and clear controls.
/tmp/ws/index.html (10236 bytes)Successfully wrote 10236 bytes to /tmp/ws/index.html
/tmp/ws/index.html (11432 bytes)Successfully wrote 11432 bytes to /tmp/ws/index.html
/tmp/ws/index.html (14745 bytes)Successfully wrote 14745 bytes to /tmp/ws/index.html
{"command":"ls -la /tmp/ws/index.html && wc -l /tmp/ws/index.html"}-rw-r--r--. 1 node node 14754 Aug 1 20:10 /tmp/ws/index.html 484 /tmp/ws/index.html
Created `index.html` — a fully self-contained Conway's Game of Life implementation: **Features:** - **Full-screen canvas** with wrap-around toroidal grid - **Click-and-drag** to draw/erase cells (works with touch too) - **Play/Pause** (Space), **Step** (→/.), **Randomize** (R), **Clear** (C) - **Speed slider** (1–60 fps) - **Cell size** selector (4px–24px) - **Grid overlay** toggle - **Stats** showing generation count, population, and grid dimensions - **Keyboard shortcuts** for all controls **How it works:** - Uses `Uint8Array` buffers for O(1) cell access - Alternates between two grids each generation (double-buffering) - Colors cells with HSL hue based on position + generation for visual interest - Responsive — resizes with the window, preserving existing cells
TAKE IT TO CODE
A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.
RUN
EVALUATION
Full-screen Game of Life grid simulates correctly (space/enter runs generations), with controls for speed, cell size, and clear.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.