# 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. ## Tilesets `tilesets/coast.json` and `tilesets/rooms.json` list tile ids, edges, and allowed neighbour pairs. Tests read those files. The broken fixture is `tilesets/broken.json`. ## Seed 7 The finished grids are `fixtures/wfc-coast-7.txt` and `fixtures/wfc-rooms-7.txt`. The placement sequence (cell, tile) is in the sibling `.json` files, so a mid-collapse at step 40 is defined. ## Retry A retry increments `retries`, does not reset the seed cursor, and stops at 8. A contradiction result includes the last empty cell's coordinates. ## Screenshot tolerance 8 levels, 98% of pixels. The finished map's tile ids must also match the file exactly. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | A map that collapses | Shown above the grid. | | `width` | Grid width | 16 | From 4 to 48. | | `height` | Grid height | 16 | From 4 to 48. | | `seed` | Seed | 7 | A whole number. | | `explain` | Show entropy | on | A faint number on an uncollapsed cell, the count of remaining tiles. | | `step` | Step mode | on | A control advances one collapse at a time. Tests use this. | | `tileset` | Tileset | coast | A shipped set of tiles and adjacency rules. | ## 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/wfc-coast-7.txt` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/wfc-rooms-7.txt` | 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. | | `tilesets/broken.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `tilesets/coast.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `tilesets/rooms.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. ## 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/map.png` | A 16×16 seeded collapse, seed 7, the south-east still open. | ## 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. A seeded run is deterministic and uses only allowed adjacencies, checked on every edge of the finished grid. A contradiction fixture retries the documented number of times and then reports failure. A golden map is compared, and the tile-id grid is compared exactly. No network.