Make a Card Game With AI: Rules, Prompt and Edits
Make a Card Game With AI: Rules, Prompt and Edits
Write the rules the way you would explain them to a friend, and Zugo builds a playable browser card game: a shuffled deck, a deal, legal moves, a score and a win condition. A build costs 6 credits and takes about a minute. The rules that come out slightly wrong are then fixed with 3 credit edits.
Card games are a strange case for text prompts. The visuals are trivial, and the rules are everything. That flips the usual advice: you spend almost no words on how it looks and almost all of them on what is legal, what beats what, and when the hand ends.
Which card games can a prompt actually build?
Anything with rules you can state in a paragraph builds well. Anything with a rules engine, hundreds of unique cards and interacting abilities is a development project that happens to involve cards.
| Card game | How it builds from a prompt | What usually needs edits |
|---|---|---|
| Klondike solitaire | Deal, stacks and drag to move come out close | Stock recycling, aces to foundations, auto complete |
| Blackjack against a dealer | Very close on the first build | Ace counting as 1 or 11, split and double down |
| War or high card | Almost always correct immediately | Tie handling, pacing between rounds |
| Memory match pairs | Reliable, it is a grid and a compare | Flip timing, difficulty by grid size |
| Uno style shedding game | Playable core, house rules drift | Wild cards, stacking penalties, turn direction |
| Trading card game, 200 unique cards | Not a one prompt job | Every ability is its own logic |
The pattern is straightforward. If the whole rulebook fits in a paragraph, the first build plays. If the rulebook is a document with exceptions to the exceptions, expect to build it in pieces, one mechanic per edit. A memory game in particular is the friendliest starting point, and it gets its own walkthrough in make a memory game with AI.
What has to be in the prompt?
For most genres the prompt is about feel. For card games it is about law. Name these five things and the deal comes out right:
| Element | Vague prompt | Prompt that builds |
|---|---|---|
| The deck | "a card game" | "standard 52 card deck, four suits, shuffled at the start" |
| The deal | (missing) | "deal seven cards to the player, seven to the computer, rest is the draw pile" |
| A legal move | "play cards" | "you may play a card matching the suit or the rank of the top discard" |
| Turn order | (missing) | "player goes first, then the computer plays automatically" |
| How it ends | (missing) | "first to empty their hand wins, show a result screen with a rematch button" |
The single most common miss is the legal move rule. If you do not say what makes a play valid, the build guesses, and you end up playing something adjacent to the game you had in mind. Write that line as if it were going into a rulebook, not into an advert.
Everything else is negotiable later. Card backs, table felt colour, the animation when a card flips: all of that is a short edit once the rules behave.
How do you build a card game in Zugo, step by step?
- Write the rules paragraph. Deck, deal, legal move, turn order, win condition. Five short sentences beats one long one.
- Send it and wait for the verified build. It takes about a minute. Zugo runs the build in a sandbox before showing it, so what arrives actually loads and deals.
- Play a full hand. Not two moves: a full hand, to the win screen. Rules bugs hide at the end, in the last card, in the tie, in the empty draw pile.
- Fix one rule per message. "When the draw pile is empty, shuffle the discard pile back in, keeping the top card." Each edit is 3 credits and gets its own sandbox check.
- Publish in one click to your-game.zugo.run and send the link to someone who knows the game well. They will find the rules edge case you did not.
What about a real deck of card images?
The build draws cards as generated shapes, suits and numbers, which for most card games is exactly right: legible, clean, and it scales down to a phone. What it is not is a licensed deck, a hand illustrated tarot set or a specific publisher's card faces.
If you have your own artwork, you can upload it and ask for it to be used for the faces and backs. That is the normal route to a distinctive look. What you cannot do is describe a copyrighted deck and expect a copy of it, which is a legal boundary as much as a technical one.
How do you get the rules right when the first build gets them wrong?
Test in the order that bugs hide. First a normal hand, then a hand you deliberately play badly, then the two states nobody thinks about: the empty draw pile and the exact tie. Most rule failures in a generated card game live in one of those two places.
Then fix them one at a time, in the language of the rule rather than the language of the code. "An ace counts as 11 unless that would bust the hand, in which case it counts as 1" is a better edit than "fix the ace bug". The first one is a rule, and the build implements rules well. The second one is a complaint.
Resist bundling. Five rule changes in one message will usually produce three correct ones and two that quietly contradict each other, and you will not know which edit caused which. One rule per message costs the same in total and leaves you with a game you understand.
What does a card game cost in credits?
The pricing is per action, so a game with fiddly rules costs more than a simple one only because it takes more edits, not because cards are special.
| Action | Standard | Hi-Fi mode |
|---|---|---|
| New build | 6 credits | 12 credits |
| Chat edit | 3 credits | 6 credits |
The Free plan gives 5 credits to try it. Pro is $25 a month for 200 credits, which is roughly 33 builds or 66 edits, and Business is $99 a month for 800 credits. In practice, a solitaire or blackjack build settles down after six to ten edits, while a shedding game with house rules takes more, because every house rule is a separate line of logic.
Where does a prompt stop being enough?
Multiplayer is the big one. Two people playing the same hand from two devices needs a server holding the game state, not a browser page. Zugo can connect to Supabase for a database and accounts, but a real time card table is a build with a backend behind it, not a sentence.
The second boundary is depth. A game with a hundred cards that each modify the rules is a rules engine, and building one by chat means many edits, in a deliberate order, with testing between them. That is possible and it is not quick. Being straight about it: this is where Zugo assists a developer rather than replacing one.
The third is offline and app stores. What you get is a browser game. It plays on any phone through a link, but it is not a native app binary. The wider list of things a prompt will not hand you is in what an AI builder cannot build.
How do you publish and share it?
Publishing is one click, and the game lands at your-game.zugo.run with a link you can send anywhere. Paid plans let you point your own domain at it and remove the Zugo badge. Card games spread by link better than most genres, because the person you send it to already knows the rules.
For the general prompting rhythm across other genres, how to make a game with AI covers the same ground with less emphasis on rulebooks. When you are ready to deal the first hand, the free credits are waiting at zugo.dev.