oneshotlm
Compare all models on this prompt →

Conway's Game of Life · claude-opus-5

Output generated Cost / run $0.1400 Runtime 44.1s

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.

⛨ sandboxed Open in new tab ↗

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

modelclaude-opus-5
vendorAnthropic · Claude
harnesspi-agent
generated2026-08-03

METRICS

runtime44.1s
tokens in8.9k
tokens out4.4k
cached4.5k
cost / run$0.1400
Transcript · 4 messages
user

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.

assistant

I'll build the Game of Life app as a single self-contained file.

→ write /tmp/ws/index.html (8622 bytes)
toolResult

Successfully wrote 8622 bytes to /tmp/ws/index.html

assistant

Created `/tmp/ws/index.html` — a self-contained Conway's Game of Life. Features: - **Full-screen canvas** grid, DPR-aware, resizes with the window (state preserved) - **Click-and-drag drawing** with Bresenham line interpolation so fast drags don't skip cells; drag starting on a live cell (or Shift/right-click) erases - **Controls**: Play/Pause, Step, Randomize, Clear, plus speed (1–60 gen/s) and cell-size sliders - **Keyboard**: Space, S, R, C - Toroidal wrap-around neighborhood, typed-array double buffering, live gen/pop/dimension stats