{"id":"019cd46f-1415-7fce-a3aa-e6a3a261313e","title":"Why I Chose 21 Matches in Nevet","slug":"2026/03/why-i-chose-21-matches-in-nevet-really","renderedHtml":"<p>I chose 21 matches in nevet, the bot that accompanies bytecode.news, deliberately. It's a command, triggered with &quot;21 matches,&quot; and it wants you to take between one and three matches every turn; the bot does the same, and the loser is determined by whoever has to take the last match on the board. It's fundamentally simple: the strategy is for the bot to make sure that four matches are removed every turn (so 4-&quot;player choice&quot; every round) and, done correctly, the bot can never lose.</p>\n<p>It's not exactly an entrancing game. But it's very effective here.</p>\n<p>&quot;21 Matches&quot; was a deliberate design choice. Like &quot;Hello World&quot; for compilers, 21 Matches serves as a &quot;gamer Hello World&quot; - a pedagogical stepping stone that exercises the full programming cycle without taxonomic complexity</p>\n<p>The game encompasses fundamental programming concepts: state management across multiple turns, input handling (player choices), output generation (computer responses), loops, and exit conditions. Its simplicity is intentional - the computer cannot lose if programmed correctly, which itself becomes a validation mechanism.</p>\n<p>For nevet specifically, 21 Matches proved critical architectural patterns. While other bot operations had already validated basic call-and-response I/O mechanisms, they lacked persistent state. Implementing 21 Matches required building state storage that allowed operations to access historical context - essentially proving out the stateful operation model that subsequent features would require. The game's trivial winning condition (the computer always wins with correct logic) made it an ideal testbed: complex enough to require real state management, simple enough that bugs would be immediately obvious.</p>","excerpt":"I chose 21 matches in nevet, the bot that accompanies bytecode.news, deliberately. It's a command, triggered with 21 matches, and it wants you to take between one and three matches every turn; the...","authorId":"019c5c8a-609d-7cd4-975b-50bbcc412a33","authorDisplayName":"dreamreal","status":"APPROVED","publishedAt":"2026-03-10T00:34:15.464Z","sortOrder":0,"createdAt":"2026-03-09T21:09:35.380016Z","updatedAt":"2026-03-10T00:34:15.591738Z","commentCount":0,"tags":["architecture","bot","design","game","state management"],"categories":[],"markdownSource":null}