# Pixel canvas ## What this builds A shared pixel board. Several clients paint, one pixel at a time, with a cooldown. Conflicts (two paints on the same pixel) are resolved by a documented rule. Tests run a local in-process server and two or more clients, not a public host. A golden board and a time-lapse frame are taken. The palette is original. Read `spekkr.inputs.json` first. `title` labels the board. `size` and `cooldown` set the rules. `palette` is the colour set. `timelapse` and `grid` change what is recorded and drawn. ## Out of scope - A public internet board in the checks. - A live moderation team or accounts, in this version. - Network beyond the local server. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Paint, cooldown, conflict - A paint at (x, y) with a colour id is accepted if the client is off cooldown, and the pixel becomes that colour. - A second paint from the same client before `cooldown` ms (virtual clock) is refused. - Two clients painting the same pixel in the same tick: the lower client id wins, as in `design.md`. The losing paint is reported as a conflict. Accept when: the script in `fixtures/pixel-ops.json` ends in the board in `fixtures/pixel-board.json`, including a refused cooldown and a documented conflict. ### R2. Frames and files - Goldens: an empty board, two clients mid-script, the final board, and a time-lapse frame (the last snapshot, or a collage if the file says so). - One command starts the local server, runs the script on a virtual clock, and writes the frames. No public network. Accept when: the command passes at size 32 and 64, and the frames match the goldens. ### R3. 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. ### R4. Checks and report - One command runs every acceptance check at the defaults and at the person's inputs, including golden frames where a requirement asks for them. - Checks do not need a network, a paid API, or physical hardware. Accept when: the command passes at the defaults, and a deliberately broken fixture or a wrong price fails it. ## Verification Multi-client paint, cooldown, and conflict are tested against a local in-process server and a virtual clock. The final board matches a file. A golden board and a time-lapse frame are checked. No public host and no real network are required. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to run a local room, how conflicts are decided, and how to run the checks.