This page is only the lobby. Each game is its own small page in games/. Tapping a poster loads that page in a full-screen frame; Back throws the frame away. That is how real casino lobbies run games made by outside studios on their own servers: the lobby loads fast and only the game you open gets downloaded.
The lobby keeps the wallet. A game never changes your coins itself: it sends bet and pay messages with postMessage, the lobby checks each one, updates the balance and sends the new balance back. Open game-shell.js to see the protocol. One big difference from real money: here the game draws its own random result. A real server draws it, so nobody can win by editing the page.
Every outcome comes from one function, RNG.next(), which returns a number from 0 up to (not including) 1. By default it reads the browser's cryptographic generator (crypto.getRandomValues). You can switch to a seeded generator (mulberry32) below, which makes every spin, round and shuffle repeat exactly. That is handy for debugging and for checking the math by hand.
Mode: crypto.getRandomValues
When you press Spin, Launch or Deal, the result is already picked before any animation starts. The spinning reels and the rising line are only a way to reveal it. Real games work the same way: the server draws the result, the client plays the show.
RTP is the average share of each bet that comes back over many plays. The house edge is 1 − RTP. For the slot, RTP is the sum over every winning combination of its probability times its payout:
RTP = Σ P(combo) × payout(combo) P(three of symbol s) = (weight_s / total_weight)³ P(exactly two cherries) = 3 × p² × (1 − p)
The page computes this from the reel weights, so if you edit SYMBOLS in the code the number in the header updates.
r = RNG.next() // uniform in [0, 1) crash = floor(100 × 0.96 / (1 − r)) / 100 // at least 1.00 P(crash ≥ m) ≈ 0.96 / m
If you always cash out at a target m, you win m times your bet with probability 0.96 / m, so the expected return is 96% whatever target you choose. About 4% of rounds crash instantly at 1.00×. The multiplier grows as e^(k·t), doubling roughly every 6 seconds.
A six-deck shoe is shuffled with Fisher–Yates using the same RNG and reshuffled when fewer than 52 cards remain. With these rules and perfect basic strategy the house edge is roughly 0.5 to 0.7 percent; missing splits makes it a little worse for you.
P(k gems in a row) = Π (safe − i) / (25 − i), i = 0 … k−1 multiplier(k) = 0.97 / P(k gems in a row)
The bombs are placed with the same Fisher–Yates shuffle before your first click. Because the payout is the fair price times 0.97, stopping after any number of gems returns 97% on average. More bombs means a steeper curve, not a better deal.
With an 8-deck shoe, a tie happens about 7.47% of the time. A Dragon or Tiger bet returns about 96.27% (it wins 46.27% of rounds and gets half back on ties). The Tie bet at 8:1 returns only about 67%, a typical "sucker bet" worth noticing in the math.
The lobby copies the common layout of mobile casino apps: a sticky balance bar, a promo banner, a scrolling "recent wins" strip, category chips, a grid of game tiles and a bottom tab bar. Here the banner offers free coins instead of deposit bonuses, and the wins strip is labeled demo bots whose wins come from real draws of the slot math.
Keno: P(k hits | n picks) = C(n,k)·C(80−n,20−k) / C(80,20); hot ball ×4 when the 20th ball is a pick (chance k/20) Dice: chance = (100 − target)/100, payout = 0.97 / chance Wheel: prize picked by weight, then the wheel turns to it
Each Keno pay table (2 to 10 picks) is tuned so its return, hot ball included, lands between 95.9% and 96.5%; the rules page lists every table and its exact return. The bonus wheel is free coins, so it is not counted as a bet in any game's return.
Fish: P(catch) = 0.96 / fish multiplier -> every shot returns 96% Roulette: return = 36 / numbers covered, wins with covered/37 -> 97.30% Slots: line win = line pay × total bet / 50, left to right, WILD substitutes
The video slot return (about 96%) comes from a simulation of over a million spins, free spins included, because exact math for 50 lines with wilds and retriggers is long. Moon Howl and Bull Rush share the same math with different art.
Tin coins are play money. There is no deposit or withdrawal, by design. Press Free refill whenever you like.
| Tracking no. (tap to copy) | Game | Bet | Score | Win/lose | Betting time |
|---|
Nothing is downloaded: it is the same page, opened full screen.
Tin coins are free play money. They can't be bought, sold or cashed out.
Out of coins? Press the + next to your balance for a free refill. Each game's i or menu button explains its rules.
Tin coins have no cash value and cannot be bought or sold. This page is a study project.