# Make a two-player card game with private hands

> Build a short online card duel in Summer Engine. Deal a private hand to each player, share the board and let the match server decide whose turn it is.

- URL: https://www.summerengine.com/blog/make-a-two-player-card-game-with-private-hands
- Published: 2026-11-26T00:00:00.000Z
- Author: Summer Team
- Tags: Multiplayer, Card games, Tutorial

## Quick answer

Have the server shuffle and deal the deck. Give each player their own card identities and the opponent’s card count. Share played cards, scores and the current turn with both players.

When Jo plays a four, Sam needs to see that four to respond. Sam also needs to know how many cards Jo has left. The faces of those unplayed cards belong in Jo’s window. Here’s a six-card game you can use to check exactly what each player sees.

## Build a duel you can finish in three turns each

Use six numbered cards, one each from 1 to 6. Deal three to each player. The first player leads a card face up. The other plays any card from their hand. The higher card wins the pair, called a trick, and earns one point. The winner leads next. After three tricks, whoever has more points wins the duel.

Suppose Jo holds 1, 4 and 6, and Sam holds 2, 3 and 5. Jo leads the 4. Sam can spend the 5 to win now or give up the 2 and save the 5 for later. Sam should be able to make that choice without seeing Jo’s remaining cards.

> Build a two-player card duel. The server shuffles cards 1 through 6, deals three per player and picks the opening player. Send each player their own hand and the opponent’s card count. When a player selects a card, check that it is their turn and they hold that card. Reveal it on both boards. After the reply card, award one point to the higher card and let its owner lead next. Keep the played pairs visible. End after three tricks.

The important detail is where you decide what to reveal. If both clients receive the full deck and the interface draws a card back over the opponent’s hand, both already have the answer. Ask the agent to keep the hand identities private when the server sends state to each player. [Summer’s private-state guide](https://docs.summerengine.com/build/shared-state) · [Online card-game guide](https://docs.summerengine.com/build/games-like/card-games)

## Read the same turn from both seats

Open two players with Local Play. In the first window, count three visible card faces. In the second, the opponent should appear as three backs or a count of three. Ask your agent to inspect which card identities the server sends to each seat as well. The screen alone only tells you what was drawn.

Use the example hands for one round of testing. Lead with Jo’s 4. Both windows should show a 4, two cards left for Jo and a score of 0–0. Double-click Sam’s 5. Just that card should leave Sam’s hand, Sam should score one point, and Sam should lead the next trick. Finish the duel. The board should show three pairs and the two final scores should add up to three.

This also gives you a useful design test. Can a friend tell whose turn it is without asking? If they hesitate, label the turn before adding more cards or a ranked ladder.

---

## Machine-readable resources

- Site index for agents: https://www.summerengine.com/llms.txt
- Full inlined content: https://www.summerengine.com/llms-full.txt
- Porting catalog: https://www.summerengine.com/llms-porting.txt
- Structured catalog: https://www.summerengine.com/agent-catalog.json
- Sitemap: https://www.summerengine.com/sitemap.xml
- Documentation: https://docs.summerengine.com
- Summer API (assets from any agent or code; public per-call model prices): https://docs.summerengine.com/api