# Design This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold. ## Tick order Scan from the bottom row to the top, left to right. A cell that already moved this tick is skipped. Neighbour reads are from the previous grid. ## Tiny-grid cases Each case is a before/after pair in `fixtures/sand-cases.json`. The cases include: a single sand cell on empty space falls one row; water on a floor spreads one cell left and right over two ticks; fire next to fuse turns that fuse into fire and itself into ash after 3 ticks; plant next to water fills one empty neighbour after 8 ticks. ## Known scene checksum After 240 ticks of `fixtures/scene-fountain.bin`, `wind` off, no wrap: counts are recorded in `fixtures/scene-fountain-240.json` (empty, sand, water, fire, plant, fuse, ash). Tests compare those counts exactly, then compare the PNG. ## Screenshots These pictures are headless-Chrome captures of the working reference in `reference/preview.html`, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/scene.png` | The default 128×128 scene after the dune has slumped: sand, water, plant, fuse and fire. | ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `width` | Grid width | 128 | From 32 to 512, a power of two. | | `height` | Grid height | 128 | From 32 to 512, a power of two. | | `seed` | Wind seed | 1 | A whole number. Used only when wind is on. | | `wind` | A little wind | off | A weak sideways bias on powder and water, seeded. | | `wrap` | Wrap left and right | off | Cells that leave one side enter the other. The floor still blocks. | | `palette` | Palette | studio | Colours for the elements and the desk. | ## Acceptance at the defaults The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins. | Fixture | Role | | --- | --- | | `design.md` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/sand-cases.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/scene-fountain-240.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `spekkr.inputs.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy. ## How to verify 1. Run the checks at the default inputs, without a network. 2. Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file. 3. Repeat once at the person's inputs when they differ from the defaults. 4. Cellular tests on tiny grids assert that water flows down, fire consumes fuse, sand piles, and plant grows, exactly as the case file says. A known 128 by 128 scene is ticked 240 times and must match a checksum and a golden frame. No network and no live gallery.