docs: add gol-simulation OpenSpec change

Plan Game of Life mechanics: Conway rules, pause/resume, stepping,
speed control, and paused-only cell editing with drag painting.
This commit is contained in:
2026-11-08 15:39:25 +01:00
parent 983b0cbee4
commit 00a2b6b03e
5 changed files with 181 additions and 0 deletions
@@ -0,0 +1,29 @@
# Proposal
## Why
The application now supports input, pattern placement, and HiDPI rendering, but has no Game of Life dynamics. This change adds the actual automaton: Conway's rules, pause/resume, single stepping, speed control, and mouse editing of cells, so the tool becomes usable for exploring patterns.
## What Changes
- Add Conway's Game of Life simulation that updates the cell grid on a timer.
- Start paused by default; allow pause/resume, single-step, and speed changes.
- Allow mouse editing of cells (left click sets alive, right click sets dead) only while paused, including drag painting.
- Add default key bindings for pause (`p`), step (`n`), and speed (`+`/`-`).
- Render simulation state and reflect pause/editing in the UI (via stdout status).
## Capabilities
### New Capabilities
- `gol-simulation`: Conway rules, tick timing, pause/resume, stepping, speed control, and paused-only editing.
### Modified Capabilities
None.
## Impact
- Affected code: `wlgol.c`, `grid.c/h` (read during ticks), possibly new `simulation.c/h`.
- Reuses existing input/config infrastructure; no new dependencies.
- Config defaults updated with simulation keys.