← MTG Lab

Rules engine status

A Magic: The Gathering rules engine in Rust, written from the Comprehensive Rules (6 November 2026) and aimed at 3 Card Blind. It is the referee for a game: it applies the rules, lists every legal choice at each decision and says who won. It is early: a handful of hand-written cards, enough rules to play real games with them.

There is no app for the engine itself, only a JSON API. The sample games on this site are recorded from it and replayed here for review. The source is on GitHub.

Sample games
12
Playable cards
11 + basic lands
Engine build
…
Last updated
25 Nov 2026

What works today

Not yet

The full rule-by-rule table is docs/coverage.md; every difference between 3 Card Blind and the Comprehensive Rules, and how each is handled, is in docs/three-card-blind.md.

Updates

Newest first. Issue numbers are on GitHub.

  1. 25 Nov 2026

    • Status page. This page replaces the old rules engine web app, which was retired along with its card browser. The engine itself has no UI; look for it here.
    • Initiative and Undercity (#9, in part). Taking the initiative, its three triggers, and venturing into Undercity. Two rooms wait on randomness.
    • Dungeon of the Mad Mage (#8) and Tomb of Annihilation (#7) join Lost Mine of Phandelver.
    • API: games now carry choice_descriptions, a readable label for each legal choice (#10). The sample games here use it.
    • 3CB Lab launched at /3cb/ with 12 sample games, each testing one rule, to be stepped through and reviewed.
  2. 24 Nov 2026

    • Engine restarted as API-only. A new Rust engine with no graphical UI, built from the 6 November 2026 Comprehensive Rules. The earlier version, with a game visualizer and card browser, was archived.
    • 3 Card Blind preset and a turn limit, with each rule decision written down.
    • 3CB opening hand: the whole deck is the hand, the library is empty, no mulligans (#1). Drawing from an empty library no longer loses (#2).
    • Vintage deck legality checked when a game is created (#5).
    • Dungeons, venture and the initiative first implemented (#6).
    • Mandatory loops are draws (#3), and secret choices are made publicly, active player first (#4).