# 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. ## Merge fixtures The cases are `fixtures/merge-cases.json`: a slide into an empty row; two 2s becoming a 4 and scoring 4; a row `2 2 2 2` becoming `4 4 . .` (not a 8) and scoring 8; a row `4 4 8 8` becoming `8 16 . .` and scoring 24. ## Seed 17 start (4 by 4, 2 start tiles) The board file is the authority. New tiles after each move of the mid-game script also use this seed, continuing from the start. ## Screenshot tolerance 8 levels, 98% of pixels. Mid-game is taken at the end of the script, animations settled. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | Slide and merge | Shown above the board. | | `start_tiles` | Tiles at the start | 2 | 2 or 3. Each is a 2, or a 4 with the odds in design.md. | | `animations` | Animate slides | on | Moves ease. Tests may jump to the end of a move. | | `undo` | One undo | on | A control restores the previous board and score once. | | `size` | Board size | 4 | A 4 by 4 or 5 by 5 board. | ## 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 | | --- | --- | | `fixtures/merge-cases.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/merge-midgame.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/merge-seed-17.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. | 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/board.png` | A mid-run seeded board, score 1 248, a 64 already on the grid. | ## 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. Merge and score tests cover single merges, a row that must not chain twice in one move, and the documented scores. A seeded board is used for the start and for a mid-game script. Win (a 2048 tile) and stuck states are tested. A golden mid-game screenshot is checked. No network and no third-party art.