Every engine
03Engine

Roulette

A single-zero wheel: 37 pockets, the standard bets, one spin.

Kind
one draw, single-zero wheel
Largest win
36x the stake
Name in the files
roulette
Version
173234716b9b

Download this engine as one file

What the player sets

  • bet and sel: one bet. straight: sel is the number, 0 to 36. red, black, odd, even, low (1-18), high (19-36): no sel; zero loses all six. dozen: sel 0 to 2, wins when (n-1) div 12 = sel. column: sel 0 to 2, wins when (n-1) mod 3 = sel. split, street, corner, line, trio, basket: sel is the bet's place, from 0, in the list for its kind (insideBets in the file; red lists the red numbers)
  • or bets: up to 60 bets on one spin, each [bet, sel, units]; the stake is shared between them by units

Every round also takes the return dial in basis points (none: the standard wheel, 36/37), and a stake.

The round, in order

  1. n = int_below(37)
  2. each bet pays 36 / (numbers it covers) times its share of the stake when n is one of them

int_below(m) is a whole number from 0 to m-1: limit = 2^64 - (2^64 mod m); take values until v < limit; return v mod m. shuffle: Fisher-Yates from the end, j = int_below(i+1). Words: HMAC-SHA256(key = seed, "STORM-DRBG|" || u64be(j)), cut into big-endian u64s.

What it pays

A bet covering c numbers pays 360000 div c (x10k) and wins c times in 37, so every bet returns 36/37 (97.297%). No dial: it is the standard wheel. With several bets the round pays the sum, each weighted by its units.

Tables

The tables the round uses at three points of the dial, each with its exact return. A multiple is kept in the files as a whole number times 10,000, rounded down (Storm’s multX1e4); here it is written out.

Dial at 97.3%

The bets
BetPaysNumbers coveredExact return
basket9x497.2972% (36/37)
black2x1897.2972% (36/37)
column3x1297.2972% (36/37)
corner9x497.2972% (36/37)
dozen3x1297.2972% (36/37)
even2x1897.2972% (36/37)
high2x1897.2972% (36/37)
line6x697.2972% (36/37)
low2x1897.2972% (36/37)
odd2x1897.2972% (36/37)
red2x1897.2972% (36/37)
split18x297.2972% (36/37)
straight36x197.2972% (36/37)
street12x397.2972% (36/37)
trio12x397.2972% (36/37)

On Storm

In Storm’s core this engine is built from this page as written, with the settings and the largest win above, and is right when it reproduces the test rounds below. The rest of this part is about the templates Storm has live today, which is the way onto Storm until then.

Our reading against Storm’s templates: fits with a cap (choice). One bet a spin fits; a list of several bets on one spin does not.

On the templates it would take: the `choice` template: one table of two rows per bet (36/covered numbers, 37 pockets). Its params are not published.

Check a build against ours

16 whole rounds, each from a seed given in the file. A build is right when, from the same seed, settings, dial and actions, it makes the same draws in the same order and pays the same amount. The seed of a test round is sha256("rain-engine-vector|<engine>|<case>|<rtp_bps>|<i>"), given in hex in each vector.

dozen 2, dial 9730
seed 1aff9ad9a32a2e8064e5a4fcb01b7af85f649d839c0c5cf63701c70599532fff
settings {"bet":"dozen","sel":1}
draws int_below(37) = 22
pays 3x (payX10k 30000)
red, dial 9730
seed 0c5555575645238a243df130ae266fec7b4666ebc4d6337a90b5c9fd233a512a
settings {"bet":"red"}
draws int_below(37) = 15
pays 0x (payX10k 0)

The rest are in this engine’s file, with the full result of each round. The reference build plays this engine and reproduces every one of them.