~ / services/card-games

Browser and mobile card games

Traditional card games have simple rules on paper and many edge cases in code. We build the rules engine first and the table second.

Rules engine

We write the rules as a pure state machine: a game state, a list of legal moves and a function that applies a move. The interface never decides what is legal. That makes the game testable and lets the same engine run in a browser, on a server for multiplayer, and inside a mobile app.

Computer opponents

Opponents range from simple rule-based players for beginners to search-based players that sample possible hands. Each difficulty level is tested over thousands of simulated games so that "easy" is beatable and "hard" makes sensible plays.

Tables that work on phones

Most players are on a phone. We design for one-thumb play: cards large enough to tap, a clear indicator of whose turn it is, and animations short enough not to slow the game.

Tutorials and house rules

Many traditional games have regional variants. We build them as options on the same engine and add an interactive tutorial for first-time players.

Example

Our Durak project notes describe one such game, and the journal post on designing a browser card game walks through the rules-to-interface process.