Generation Prompt
Page: Cellular Automata - Interactive Simulation
Slogan: "Simple rules, emergent complexity"
Structure:
- Widget before:title -> h1 + p.slogan centered
- Main -> Canvas in .card.full.ratio-16-9 (HD via devicePixelRatio)
- Widget right:controls -> Start/Stop, Step, Reset, Clear buttons
- Widget right:presets -> Dropdown with classic automata presets
- Widget right:options -> Grid size, speed slider
- Widget right:stats -> Generation, population, born/died counters
- Widget after:algorithm -> Explanation of rules and presets
- Widget modal:claude -> Documentation
Presets:
- Game of Life (B3/S23): Classic Conway rules
- HighLife (B36/S23): Supports replicator pattern
- Day & Night (B3678/S34678): Symmetric black/white rules
- Seeds (B2/S): Explosive growth, no survival
Features:
- Configurable grid size (50x50 to 200x200)
- Mouse drawing (click/drag to toggle cells)
- Wrap-around boundaries (toroidal grid)
- Speed control (1-60 generations/second)
- Statistics tracking (generation, population, births, deaths)
Implementation:
- Double-buffered grid for clean updates
- requestAnimationFrame for smooth animation
- devicePixelRatio for HD canvas rendering
- CSS variables for theme integration
- Responsive breakpoints for mobile