# 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. ## Piece set (`seven`) Shapes are listed as cell offsets from an origin, then rotated 90 degrees clockwise about that origin. The exact cells are `fixtures/pieces.json`. The `five` set is ids `I`, `O`, `T`, `L`, `J` from that file. The remaining two ids are `S` and `Z`. Wall kicks: try the rotate in place, then 1 cell left, then 1 cell right. If none fit, the rotate does not happen. ## Line-clear fixture Seed 7, `seven` set, well 10 by 20. The driver commands are `fixtures/pdf-clear.json`. After they run, row 0 (the bottom) is cleared, the score is 100, and the well matches `fixtures/pdf-after-clear.txt`. ## Screenshot tolerance Each channel within 8 levels, 98% of pixels, page rendered at 1600 by 1000. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title on the page | Blocks in a page | Shown above the well. | | `width` | Well width in cells | 10 | From 6 to 12. | | `height` | Well height in cells | 20 | From 12 to 24. | | `next_piece` | Show the next piece | on | A small preview beside the well. | | `ghost` | Show a landing ghost | on | A faint copy where the piece would land. | | `set` | Piece set | seven | seven is the ordinary five-and-two set of shapes. five is a shorter set for a quicker demo. | ## 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/pdf-after-clear.txt` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/pdf-clear.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/pieces.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. ## 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/page.png` | A falling-block loop mid-game, drawn inside a document page. | ## 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. An automated driver (or the embedded script under a test harness) starts a game, places a piece, and clears a line. The first page and three later frames are rendered and checked against goldens. The piece set and art are original. No network and no paid viewer.