How a Phone Shuffles Cards: Random Deals Explained Simply

A plain guide to how card games shuffle a deck in code, why a fair shuffle makes every order equally likely, and why streaks still happen.

• 4 min read • By the Evonix Ventures team

A phone shuffles cards by putting the deck in a list and swapping cards using random numbers, one position at a time, so that every possible order of the deck is equally likely. Done the right way, the shuffle has no memory and no favourites. Done carelessly, small biases creep in, which is why the method matters.

What "random" really means for a deck

A fair shuffle means any order of the cards is as likely as any other. For a 32-card 29 deck, the number of possible orders has 36 digits. For a 52-card Hazari deck, it is far larger. No one could ever see them all, and a good shuffle picks one of them with no pattern.

That also means a fair shuffle does not try to be "fair" in the everyday sense. It does not hand out good cards in turns. It does not make up for your last weak hand. Each deal starts fresh.

The swap method most games use

The classic way to shuffle a list is known as the Fisher-Yates shuffle. It is short, fast and well tested. In plain words:

  1. Lay the cards out in a row, positions 1 to 32.
  2. Pick a random position from 1 to 32 and swap that card into the last place. That place is now done.
  3. Pick a random position from 1 to 31 and swap that card into the second-last place.
  4. Keep going, one place shorter each time, until you reach the front.

Each step chooses only from cards not yet placed, which is what makes every order equally likely.

A common mistake is to swap every card with any random position in the whole deck, every time. It looks just as random, but some orders come up more often than others. Another mistake is to "shuffle" by sorting the deck with a random rule. Both are classic bugs that careful developers learn to avoid.

Where the random numbers come from

Computers do not roll dice. They use a random number generator, a small piece of code that produces numbers with no visible pattern. Phones also give apps access to a stronger source of randomness built into the system.

What matters for a card game is that the next number cannot be guessed from the last ones. A weak generator can repeat itself or show patterns over many deals, so developers use the good ones the platform provides.

Why streaks still happen

Players sometimes get three poor hands in a row and wonder if the deck is against them. It is not. Random results come in clumps. Toss a coin twenty times and you will usually see four or more of the same side in a row somewhere. Cards are the same.

At a real table you would shrug and deal again. On a phone the shuffle is hidden, so streaks feel more suspicious than they are. A simple way a studio checks a shuffle is to run it a huge number of times and confirm each card lands in each position about equally often.

Shuffling is only half of fairness. The other half is what the bots are allowed to see, which we cover in how offline card games keep bots honest.

What this means when you play

  • Judge your play over many deals, not one.
  • A weak hand is still worth playing well. In 29, a quiet pass helps your partner read the table.
  • In Hazari, even a poor 13 cards can win the last round if your weakest group beats everyone else's weakest. See our 3-3-3-4 walkthrough.

Deal yourself a fresh hand

Every new deal is a clean start, and that is half the joy of card games. Try a few rounds of 29 King or split a fresh hand in Hazari Royal, and see how the luck evens out as your skill grows.

How we made this: Drafted with the help of AI from our own notes and checked facts, then checked automatically before publishing. The Evonix Ventures team reviews posts and fixes mistakes. Spotted one? Tell us.

Play our games

From our sister studios

  • Pusoy King Offline (Play Boom Games)

    Thirteen cards, three hands, one winner: Chinese poker style Pusoy, offline.

  • Number Owl: Number Match (Mind Maze Games)

    Match pairs, make ten, clear the board. Plays offline.

  • 29 Master (Live Game Labs)

    The classic 29 card game, offline, against smart bots.

More posts

Logo

Independent game studio making original games for mobile platforms.

2677, 701 Tillery Street
Austin, Texas
TX 78702

D-U-N-S® Number:
119353927

© 2025 Evonix Ventures LLC. All rights reserved.