Software Craftsmanship McHenry County Β· September 9, 2026

Phalanx Duel:
Make the rules legible

Start with cards at a table. Then follow one outcome through a deterministic game engine, a server boundary, and replay evidence.

What Phalanx Duel is

Phalanx Duel is a two-player tactical card duel built on a standard 52-card deck. There is no die roll and no shuffle mid-match: once decks are drawn, every outcome follows from the cards on the table and the choices each player makes. The rules are meant to be legible enough to run at a table with two decks of playing cards, and precise enough to run identically inside a deterministic game engine.

It started on a rainy week at Boy Scout Camp Tesomas in July 2022: a standard deck, a notebook, and formation sketches worked out across friendly tabletop matches. A Ruby prototype made the combat rules executable. The current engine is a TypeScript, server-authoritative rebuild of that same tabletop core, with a web client, a Go CLI, live multiplayer matches, and replay evidence for every game. Version 1.5.0 is live in production at phalanxduel.com, with a Glicko-2 ranked ladder in beta.

This page is the companion to a talk at Software Craftsmanship McHenry County. The tabletop rules below are the same rules the engine enforces: what you can verify by hand at a table is what the server verifies on every turn.

Play a face-to-face duel

The Classic format uses two standard 52-card decks, one per player. Draw 12 cards each, build a face-up two-rank formation across four columns, then let P1 make the first attack. Damage moves through the targeted column before it can reach Life Points.

The two-page guide is deliberately light on ink and takes a new table from setup through a complete duel, including suit boundaries, special cards, reinforcement, passes, and winning at 0 LP.

Download the two-page quickstart (PDF)

Watch a 3 minute demo Draft

A walkthrough of setup, a turn, resolving an attack, the four suits, reinforcement, and winning.

Caveat: this is an early draft, not a finished production. The footage is an automated bot versus bot practice match, not human players, so pacing and card choice are not representative of real play. The narration is synthetic text to speech, not a recorded human voiceover. Rules here are a 3 minute overview; the quickstart PDF and presentation below are the fuller, human-reviewed references.

Presentation materials

The editable deck follows the talk from tabletop formation and combat into authority boundaries, deterministic replay, role-safe projections, and verification. It is a technical discussion aid, not a production-readiness claim.

Download the editable presentation (PPTX)

How a duel plays

Setup

Each player uses a full 52-card deck and draws 12 cards into a hand. Cards go face-up into a formation of four columns, two ranks deep: a front rank that can be attacked and can attack, and a back rank held in reserve. Player 1 attacks first.

A turn, in order

  1. Deploy new cards from hand into open formation slots, if any.
  2. Attack with a front-rank card into any opposing column.
  3. Damage resolves down that column, front card first.
  4. Destroyed cards clear and the column collapses to close the gap.
  5. The defender may reinforce, but only the column that was just attacked.
  6. Both players draw back toward a four-card hand.

Suits carry the damage

When a card is destroyed, damage does not simply stop: it carries into the next card in that column, and the suits involved decide how much survives. Diamonds reduce carryover between cards. Hearts can reduce the final carryover before it reaches Life Points. Clubs double one eligible overflow. Spades double whatever damage reaches Life Points.

Winning

A duel ends when a player's Life Points reach 0. Running out of cards is not a loss on its own; a player who cannot or will not attack must pass instead, and three consecutive passes or five total passes by one player end the match as a forfeit.

The player material reflects the Phalanx Duel v3.0 Classic rules. For the canonical rules reference, see phalanxduel.com/learn/rules; the full engineering rule contract lives with the game source.