Conway's Game of Life · muse-spark-1.2
Output generated Cost / run $0.0561 Runtime 26.8s
Prompt for this run
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.
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
METRICS
Transcript · 6 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.
index.html (22483 bytes)Successfully wrote 22483 bytes to index.html
{"command":"ls -lh index.html && head -n 5 index.html"}-rw-r--r--. 1 node node 22K Aug 13 01:27 index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
Conway's Game of Life built as a single `index.html` — full-screen canvas, no external resources. **Controls:** - **Play/Pause** (Space), **Step** (S), **Randomize** (R), **Clear** (C) buttons in header - **Click-and-drag** to paint cells — dragging toggles to same state (dragging over live cells erases, over dead cells paints). Works with mouse & touch (pointer events) - **Speed** slider (1–60 fps), **Wrap edges** & **Trails** toggles - **Zoom** buttons + mouse wheel/pinch, brush size with `[`/`]` - **Presets:** Glider / Pulsar / Gosper Glider Gun for quick patterns Canvas auto-sizes to fill viewport, recalculates grid (cols×rows) on resize while preserving centered pattern, with gradient cells, grid lines, generation/population counters, and keyboard shortcuts (`?` for help).