← All cases
Case 004 Trading Card Games

TCG Deck Engine

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.

Exhibit — Trading Card Games
Exhibit 004-A
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.