Appearance
Tray of Coins Math Specification
Internal game name:
tray_of_coins| Display name: "Tray of Gold"
Overview
Tray of Coins is a coin-toss game. N coins (default 30) are tossed onto a tray divided into three regions. The region holding the most coins wins, and players bet on which region wins.
| Region | Label (UI) | Description |
|---|---|---|
RED | Bet on Red | Left region |
BLUE | Bet on Blue | Center water region |
BLACK | Bet on Black | Right region |
Coin Distribution
Each coin lands independently in one of the three regions (a multinomial distribution). Per-character landing weights are configurable and normalized to 1:
| Character | w_red | w_blue | w_black |
|---|---|---|---|
| Gentleman | 0.36 | 0.28 | 0.36 |
| Lady | 0.40 | 0.24 | 0.36 |
For coin i, P(lands in region r) = w_r. The count in region r follows the joint multinomial Multinomial(N, {w_red, w_blue, w_black}).
Win Condition
Current rule is majority:
text
winner = region with strictly the greatest coin countOutcome Probability
The probability that region r wins is the sum of the multinomial probability mass over every distribution where C_r is strictly greater than every other region:
text
P(r wins) = sum of Multinomial(c_red, c_blue, c_black)
over all (c_red, c_blue, c_black) where c_r is the strict maximumThe math module computes this exactly (closed-form summation; N is small) and also provides a Monte-Carlo simulator to cross-check.
Indicative values for default weights (exact values come from the math module):
| Outcome | Indicative P |
|---|---|
| Red wins | ~42% |
| Black wins | ~42% |
| Blue wins | ~8% |
| Draw | ~2% |
Odds Derivation
text
fair_odds(r) = 1 / P(r wins)
paid_odds(r) = fair_odds(r) * RTP_target // RTP_target default 0.95| Bet | Fair odds | Paid odds @ 95% RTP (indicative) |
|---|---|---|
| Red | 1/0.42 ~ 2.38x | ~2.26x |
| Black | 1/0.42 ~ 2.38x | ~2.26x |
| Blue | 1/0.08 = 12.5x | ~11.88x |
RTP(r) = P(r wins) x paid_odds(r) = RTP_target for every bet, by construction.
Draw Handling
A draw occurs when no region has a strict majority: coins fall equally into three regions or into any two regions, so no winner can be decided.
draw_resolution | Behaviour |
|---|---|
retoss (default) | Re-run the same round: the caller re-invokes play with the same round identity (secret + server_seed) and a fresh client_seed. No new balance deduction. |
Multiplier (Premium) Coins
A configurable set of premium coins (default 2x, 5x, 6x) land on regions like normal coins (weighted) and count toward that region's total. If a premium coin lands on the winning region, its value adds to that region's payout multiplier:
text
total_multiplier(r) = base_multiplier(r) + sum(value of premium coins landing in r)The math module solves base_multiplier(r) so that the total RTP (base + premium coins
- bonus) equals
RTP_target.
Bonus Mini-Game
After a settled round, a bonus round may trigger:
| Parameter | Default |
|---|---|
bonus_trigger_probability | 0.10 |
bonus_coin_multiplier | 25x |
bonus_coins_min / bonus_coins_max | 1 / 3 |
bonus_payout = collected_coins x bonus_coin_multiplier x bet. All parameters configurable.
Configurable Parameters
| Parameter | Default | Description |
|---|---|---|
total_coins | 30 | Coins tossed per round |
region_weights (per character) | see table | Landing weights, normalized |
regions[].is_bettable | true | Whether players may bet on the region |
rtp_target | 0.95 | Return-to-player target per bet |
premium_coins | [{2},{5},{6}] | Values added to winning side |
bonus_* | see above | Bonus mini-game parameters |