Add Pixel Wars example: real-time multiplayer territory game
⚔️ Pixel Wars — 4 teams paint cells on a 20×20 grid via WebSocket.
Zero dependencies. Single Node.js file. Inline HTML/Canvas UI.
Specs: 3 files (server.md, game.md, ui.md)
→ 14 clauses → 55 canonical nodes → 9 IUs
→ 3 DEFINITION, 19 CONTEXT, 31 REQUIREMENT, 2 CONSTRAINT
→ 164 typed edges, 100% extraction coverage
Game features:
- Raw WebSocket (no socket.io) with frame encoding/decoding
- Round-robin team assignment (auto-balancing)
- 500ms paint cooldown with client-side progress bar
- 2-minute rounds with auto-restart after 10s intermission
- Territory stealing (overwrite any cell)
- Canvas rendering with glow effects and flash-on-paint
- Mobile touch support
- Win screen overlay with team scores
Files:
- examples/pixel-wars/spec/{server,game,ui}.md — requirements
- examples/pixel-wars/server.mts — playable game (275 lines)
- examples/pixel-wars/src/generated/ — Phoenix-generated code
- examples/pixel-wars/README.md