TAASH
Behind the game

How Taash shuffles the cards

How does an online card game shuffle fairly? Here's exactly how Taash deals Hearts and Court Piece: a commitment before the deal, randomness from every player, and a reveal after.

The question everyone asks

Anyone who plays cards online has wondered at some point: is this deal really random? With real cards you can watch the shuffle. Online you can't, so we think it's fair to explain exactly how Taash deals every hand of Hearts and Court Piece.

The short answer: the shuffle uses a method that neither we nor any player can steer, and the information needed to check it is published after every hand.

The shuffle itself

Taash uses the Fisher–Yates shuffle, the standard way to put a list into a random order. Picture the deck laid out in a row. Starting from the last card, you swap it with a randomly chosen card at or before it, then move one card left and repeat. Every one of the 52! possible orders (a number with 68 digits) is equally likely, as long as the random numbers are good.

The interesting part is where those random numbers come from. They're produced from a single seed, and the next four steps describe how that seed is made.

Step 1: the server commits

Before a hand is dealt, the game server draws a secret random number using a cryptographically secure generator. It doesn't reveal the number. Instead it publishes its fingerprint: a SHA-256 hash, which every player's device receives before the deal.

A hash works like a sealed envelope. It proves the secret was chosen, and it can't be changed later without the fingerprint changing too, but it reveals nothing about the secret itself.

Step 2: every player adds randomness

After the fingerprint arrives, each player's app sends 32 random bytes of its own to the server. Because the server had already sealed its secret, it can't pick a secret that works well with these bytes. And because the server's secret stays hidden, no player can choose their bytes to steer the deal.

Step 3: the deal

The server combines its secret with every player's bytes and hashes the result. That is the seed for the shuffle. The cards are then dealt from the shuffled deck: 13 to each player in Hearts, and in Court Piece five cards to the Hukum first, then the rest.

Step 4: the reveal

When the hand ends, the server publishes its secret and every player's bytes. Anyone can now check two things: that the secret matches the fingerprint sent before the deal, and that the secret plus the bytes really produce the hand that was dealt. The values are also stored with the game record, so a hand can be checked long after it was played.

The order matters. An early design collected the players' bytes before the server committed, which would have let a dishonest server choose its secret after seeing them. We fixed that before launch: the server commits first, always.

Who sees which cards

A fair shuffle is only half of it. Your device receives only your own cards. Other players' hands are never sent to your phone or browser, not even hidden or encrypted, so there's nothing for a cheating app to read. Every card played is checked by the server, which rejects any move that breaks the rules.

Stand-ins and bots

If a player drops out, a stand-in plays their seat until they come back. If nobody joins a Play Online table quickly, a bot can fill the empty seat. Bots on Taash are always labelled with 🤖 and a Bot badge, and they see exactly what a player in that seat would see: the cards on the table and their own hand. They never see anyone else's cards, and they never get a different shuffle.

Questions about how this works? Get in touch.

Put it into practice

Hearts, Court Piece and Bhabhi Thulla with real players.

Play free

Looking for players? Join the Taash WhatsApp group.

Play free Join WhatsApp group