The brief
A family plays 71 together, from four different houses. They wanted a real table: the same rules they argue about in person, faces and voices, and a deal that nobody has to take on trust.
The deal is auditable
Fairness here is commit and reveal, not a promise in a privacy policy.
- Before dealing, the server publishes a hash of a secret it has already chosen.
- Every phone contributes a nonce of its own.
- The shuffle seed is the hash of the secret together with all of the nonces, so neither side alone decides the deal.
- At the end of the round the secret is revealed, every phone re-runs the same shuffle and checks that the hand it was dealt is the hand that seed produces.
Other players' hands never travel over the wire. Bot nonces are derived from the committed secret, so the server cannot pick them after seeing the human ones either.
Three modules, one rule set
Plain Kotlin rules hold the cards, melds, turn machine, scoring and shuffle. The server is the JDK's own HTTP server with long polling and in memory rooms, and no dependencies. The Android app is built on views. Both the phone and the server compile the same rules module, which is precisely what lets a phone audit the server using the server's own shuffle code.
Then it grew
Voice and video arrived as a mesh between the phones, with the server relaying only the signalling through a per player inbox on the existing long poll. Bots came next, driven through the same methods a phone calls. Then a table browser, then blackjack, then Texas hold'em on the same table furniture, seats, chat and audit trail.
Proof by probe
- 120,000 simulated blackjack hands: dealer bust 27.95 percent, house edge 0.31 percent, zero illegal states.
- 4 million poker hands: every hand category within 0.03 percentage points of the published odds.
- 4,000 full poker hands with chips conserved exactly, and a real three way all in settled correctly on an emulator.
The bug that probe caught: side pot levels have to come from players still in the hand. Take them from folded players as well and a folded over committer creates a pot nobody is eligible to win, and the chips vanish.
Honest limits
Played on emulators, not yet on the family's own phones, and there is no permanent host for the server yet.