Card Table

Drag to move a card. Hold a stack to take all of it. Click for more. F flips.

View as

Card Table

A table and a deck of cards with no game built in. You do with the cards what you'd do at a real table, and the rules stay with the players.

Every card is somewhere: in a stack on the table, or in someone's hand. A loose card is a stack of one. On top of that, each card is either face up or face down, and a face-down card can be seen by one player who is looking at it.

That's enough for most card games. Solitaire is stacks, some face up and some face down. Poker is hands, a deck, and face-up cards in the middle. Hearts is dealing and passing cards between hands. None of those rules live here.

Each player sees a different table. Face-up cards look the same to everyone. A card in your hand shows its face to you and its back to everyone else. A face-down card someone is looking at shows its face only to that player.

A card that only one player can see tips up toward that player, the way you'd lift a card off the table to look at it. Everyone can tell who is looking at what, even when they can't see the card.

what Player 1 sees
what Player 2 sees

Both pictures are drawn from the same table by the same code the main page uses, once per seat. You can try it yourself: pick another seat under View as at the bottom of the page.

Every change to the table is a small message: move these cards there, flip this one, shuffle that stack into this order. Applying the same messages in the same order always gives the same table. A shuffle picks its new order before the message is sent, so the message carries the result rather than the dice roll.

So the host's browser keeps the real table. Everyone sends their changes to it, it applies them one after another, and it passes each one on to everybody. You see your own change straight away, without waiting for the host, and it's quietly replaced by the host's copy when that arrives.

Moves in progress don't go through the host. While you drag, your browser sends where your cards are straight to everyone else's about thirty times a second, and their tables ease the cards toward each new spot. The browsers find each other through public relays, then talk directly, so there's no server of mine in between.