Files
wlgol/openspec/changes/gol-simulation/proposal.md
T
arek 00a2b6b03e 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.
2026-11-08 15:39:25 +01:00

1.1 KiB

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.