Can Claude Code build a card game overnight?

A playable Tonk table by morning, and three more evenings of decisions

A green card table with three labelled AI opponents, a spread of eights in the middle and the player's hand at the bottom

Yes, if “card game” means a first playable build. I left Claude Code working on Superb Tonk late one night, with a design doc and empty folders. By morning the repo had a Godot project, the classic Tonk rules, a medium-strength AI, tests and a playable table with a menu and sound effects. The decisions log says it plainly: “made unattended overnight from the design doc.”

A finished game took the next three evenings, and most of that work was judgment.

What did the overnight build get right?

The parts a document can pin down: the classic rules, an AI opponent that plays them, and tests that run from the command line, so every later change could be checked against them.

What needed a person?

How the game feels, and what’s fair.

  • Rules. I asked for Knock rules that match what players of other online Tonk games expect, which added Knock and No-knock modes and waits before you can knock. Four rules questions are still open.
  • Layout. In landscape, opponents first sat on the sides. With three of them, one sat over the draw and discard piles, which read as “their” piles. They moved to one row across the top.
  • Sound. A common complaint about other Tonk apps is that they’re too loud, with no volume control. Superb Tonk has separate sound and music sliders.
  • The name and the icon, which came last.

How do you make an AI opponent fair?

By making cheating impossible and then testing it anyway. Each AI seat sees only what a player in that seat could see. Tests check that across about 1,200 positions, and 4,000 simulated hands check that no seat wins more often than it should. The coaching tips use the real deal. The guided lesson uses a fixed deal, and it says PRACTICE on screen.

Every AI seat is labelled AI. Chips are free, and a seat below 100 refills to 1,000. There’s nothing to buy.

Where did the art come from?

All of it is generated: the four table looks, twenty AI characters with their own win and lose faces, the music for each table and the sound effects. I made them with ElevenLabs’ image, music and sound effect tools, and the prompts are saved in the repo next to the art.

Some ideas didn’t make it: dragging cards, CRT screen effects and personalities for the AI characters.

Built with Godot 4.7, the GUT test framework, ElevenLabs and Claude Code.

All posts