A Durak card game for the browser
// Editorial team
Durak is a fast Russian card game played with 36 cards, where the last player holding cards loses. The public example is Durak Card Game, a free version that runs in any browser.
The brief
Play against the computer or with friends, with no download and no sign-up, on a phone or a desktop. Teach new players the rules inside the game. Support the languages of the people who play Durak, which means more than Russian and English.
What the site does
- Games against computer opponents.
- Private tables for friends, opened with a link.
- A short tutorial that teaches the rules during a first game.
- Pages on rules, strategy and variants.
- 29 languages, with hreflang tags linking each language version.
Rules engine
The hardest part of Durak in code is the throw-in. Several players may add cards at once, the number of attacking cards is capped by the defender's hand, and in the passing variant the defender can redirect the attack. A workable model is a small state machine for each bout, with explicit phases and a list of legal moves for each player at every moment.
Content around the game
Players search for rules as often as they search for a game. The site pairs the game with written pages, and marks up the home page with VideoGame and FAQPage structured data.
Lessons
Translate rule terms with native speakers. Words such as "throw in" and "transfer" have established names in Russian and Ukrainian, and literal translations confuse experienced players.
The process is written up in the journal: designing a browser card game, from Durak rules to UX.