← All cases
Case 004 Trading Card Games

TCG Deck Engine

Live — andrewwigman-001-site4.htempurl.com ↗

Deck builders use a different tool for every card game, and each game has different construction rules — deck sizes, copy limits, colour identity, leaders and bases. Nothing lets you physically lay cards out the way you would on a table.

A reusable deck-building engine where games are thin layers over a game-agnostic core: drag, stack, shuffle and fan real cards on a freeform canvas mat, search a local catalogue, and get live rule validation per format. One abstraction (the deck anchor) generalises MTG's commander to One Piece Leaders, Star Wars Unlimited Leader + Base pairs, and games with no anchor at all.

The workspace picker — one engine, six trading-card games plus a freeform MindDeck, each a thin layer over the shared core.
Exhibit 004-A The workspace picker — one engine, six trading-card games plus a freeform MindDeck, each a thin layer over the shared core.
Deck-building against the local 115,000-card Magic catalogue: a Scryfall-style query returns real card art to drop into the deck zones.
Exhibit 004-B Deck-building against the local 115,000-card Magic catalogue: a Scryfall-style query returns real card art to drop into the deck zones.
Playtest mode — a shuffled library, an opening hand fanned out and battlefield/lands zones, with a live turn and mana tracker.
Exhibit 004-C Playtest mode — a shuffled library, an opening hand fanned out and battlefield/lands zones, with a live turn and mana tracker.
Games supported
6 TCGs + a text-card workspace (7 in total)
Local catalogue
~162k cards in SQL Server, synced from 6 data sources
Tests passing
135 xUnit (engine, rules, zones, decklist parsing)
MTG formats implemented
11, incl. Commander colour identity and Partner/Background variants
Renderer
custom Canvas2D engine, no JS frameworks
Search
faceted filters + a Scryfall-style text query DSL across all games

.NET 10 Blazor Server over a plain C# core library and a modular Canvas2D renderer, built in 50+ agent-driven iterations with headless-Chrome screenshots verifying each interactive change.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.