# Zoomable life ## What this builds Conway's Game of Life, drawn so you can zoom into a cell and find another field, simulated at a slower clock, and so on. The outer field is the ordinary rule. Tests treat the recursion as a stated number of layers (three in this version) with documented scale and tick ratios. Known patterns — a blinker, a glider — must behave at a given zoom and tick. A golden frame is taken after N steps. This is an original presentation, not a copy of someone else's page. Read `spekkr.inputs.json` first. `title` is at the outer zoom. `seed_pattern` places a known pattern at layer 0. `rule` is B3/S23 unless a test says otherwise. `grid` and `wrap` change the chrome and the outer edge. ## Out of scope - A proof of a universal computer, or an unbounded number of layers in this version. - Network or a live community pattern database in the checks. - A different neighbourhood than the eight cells of Life, in this version. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. The rule at layer 0 - A cell is alive in the next tick if it has 3 live neighbours, or 2 and is already alive, under `B3/S23`. - A blinker oscillates with period 2. A glider returns to a translated copy every 4 ticks, by the offset in `design.md`. - The same starting grid and wrap setting produce the same next grid. Accept when: the blinker and glider fixtures match at the listed ticks, including the glider's offset after 4 steps. ### R2. Zoom and layers - Layer n+1 lives inside a cell of layer n. A cell is 32 by 32 of the inner field, and one outer tick is 4 inner ticks, as in `design.md`. - Zoom is a camera scale. At scale 32 a single outer cell fills the view, showing the inner field. - Three layers are required. A fourth is out of scope. Accept when: after 4 outer ticks, a fixture that has a glider in layer 1 (inside a documented outer cell) has moved by the inner offset, and a zoomed-in golden matches. ### R3. Frames and files - Frames: glider at t = 0, glider at t = 4, blinker at t = 1, and the zoomed-in layer-1 view. - One command runs the pattern tests and writes the frames. No network. Accept when: the command passes with wrap on and off (the fixtures use a field large enough that they do not meet the edge). ### R4. Inputs - The build reads `spekkr.inputs.json`. Settings label the UI, options turn features on or off, and a swap must be one of its choices. - A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key. Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check. ## Verification Known patterns (blinker, glider) are checked at a given tick, including the glider's +1,+1 offset after 4 steps. A nested-layer fixture is checked after a documented number of inner ticks. A golden frame is taken after N steps. No network and no live pattern database. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to zoom, how to load a pattern, and how to run the checks.