{
 "about": "Roulette: everything needed to build this engine elsewhere and prove the build. From r24labs' engine maths; hashes name the version.",
 "units": {
  "stake": "every amount is for a stake of 1",
  "x10k": "a multiple written as a whole number times 10,000, rounded down (19800 is 1.98x); Storm's multX1e4 is the same unit",
  "rtp": "the return dial in basis points, 9600 to 9900; roulette is fixed at 9730",
  "exact": "a return or a chance as a fraction {num, den} in text, with pct as the same value in percent to six decimals",
  "bigNumbers": "a whole number above 2^53 is written as text"
 },
 "generator": {
  "draws": "each draw in a vector is [m, value]: int_below(m) returned value",
  "int_below": "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)",
  "word": "HMAC-SHA256(key = seed, \"STORM-DRBG|\" || u64be(j)), cut into big-endian u64s"
 },
 "seed": "sha256(\"rain-engine-vector|<engine>|<case>|<rtp_bps>|<i>\"), given in hex in each vector. In play the seed is Storm's own: HMAC-SHA256(key = R_x, \"STORM-RNG-v1|\" || casino || betId || SHA256(clientSeed) || serverSeed).",
 "engine": {
  "engine": "roulette",
  "title": "Roulette",
  "kind": "one draw, single-zero wheel",
  "spec": {
   "actions": [],
   "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.",
   "round": [
    "n = int_below(37)",
    "each bet pays 36 / (numbers it covers) times its share of the stake when n is one of them"
   ],
   "settings": [
    "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"
   ],
   "summary": "A single-zero wheel: 37 pockets, the standard bets, one spin."
  },
  "params": {
   "bet": [
    "straight",
    "split",
    "street",
    "corner",
    "line",
    "trio",
    "basket",
    "dozen",
    "column",
    "red",
    "black",
    "odd",
    "even",
    "low",
    "high"
   ],
   "bets": "or a list of up to 60 [bet, sel, units]",
   "sel": "which one of that kind"
  },
  "draw": "int_below(37)",
  "dial": "none: the standard wheel, 36/37",
  "maxMultiple": 36,
  "insideBetCounts": {
   "basket": 1,
   "corner": 22,
   "line": 11,
   "split": 60,
   "street": 12,
   "trio": 2
  },
  "insideBets": {
   "basket": [
    [
     0,
     1,
     2,
     3
    ]
   ],
   "corner": [
    [
     1,
     2,
     4,
     5
    ],
    [
     2,
     3,
     5,
     6
    ],
    [
     4,
     5,
     7,
     8
    ],
    [
     5,
     6,
     8,
     9
    ],
    [
     7,
     8,
     10,
     11
    ],
    [
     8,
     9,
     11,
     12
    ],
    [
     10,
     11,
     13,
     14
    ],
    [
     11,
     12,
     14,
     15
    ],
    [
     13,
     14,
     16,
     17
    ],
    [
     14,
     15,
     17,
     18
    ],
    [
     16,
     17,
     19,
     20
    ],
    [
     17,
     18,
     20,
     21
    ],
    [
     19,
     20,
     22,
     23
    ],
    [
     20,
     21,
     23,
     24
    ],
    [
     22,
     23,
     25,
     26
    ],
    [
     23,
     24,
     26,
     27
    ],
    [
     25,
     26,
     28,
     29
    ],
    [
     26,
     27,
     29,
     30
    ],
    [
     28,
     29,
     31,
     32
    ],
    [
     29,
     30,
     32,
     33
    ],
    [
     31,
     32,
     34,
     35
    ],
    [
     32,
     33,
     35,
     36
    ]
   ],
   "line": [
    [
     1,
     2,
     3,
     4,
     5,
     6
    ],
    [
     4,
     5,
     6,
     7,
     8,
     9
    ],
    [
     7,
     8,
     9,
     10,
     11,
     12
    ],
    [
     10,
     11,
     12,
     13,
     14,
     15
    ],
    [
     13,
     14,
     15,
     16,
     17,
     18
    ],
    [
     16,
     17,
     18,
     19,
     20,
     21
    ],
    [
     19,
     20,
     21,
     22,
     23,
     24
    ],
    [
     22,
     23,
     24,
     25,
     26,
     27
    ],
    [
     25,
     26,
     27,
     28,
     29,
     30
    ],
    [
     28,
     29,
     30,
     31,
     32,
     33
    ],
    [
     31,
     32,
     33,
     34,
     35,
     36
    ]
   ],
   "split": [
    [
     0,
     1
    ],
    [
     0,
     2
    ],
    [
     0,
     3
    ],
    [
     1,
     2
    ],
    [
     2,
     3
    ],
    [
     4,
     5
    ],
    [
     5,
     6
    ],
    [
     7,
     8
    ],
    [
     8,
     9
    ],
    [
     10,
     11
    ],
    [
     11,
     12
    ],
    [
     13,
     14
    ],
    [
     14,
     15
    ],
    [
     16,
     17
    ],
    [
     17,
     18
    ],
    [
     19,
     20
    ],
    [
     20,
     21
    ],
    [
     22,
     23
    ],
    [
     23,
     24
    ],
    [
     25,
     26
    ],
    [
     26,
     27
    ],
    [
     28,
     29
    ],
    [
     29,
     30
    ],
    [
     31,
     32
    ],
    [
     32,
     33
    ],
    [
     34,
     35
    ],
    [
     35,
     36
    ],
    [
     1,
     4
    ],
    [
     2,
     5
    ],
    [
     3,
     6
    ],
    [
     4,
     7
    ],
    [
     5,
     8
    ],
    [
     6,
     9
    ],
    [
     7,
     10
    ],
    [
     8,
     11
    ],
    [
     9,
     12
    ],
    [
     10,
     13
    ],
    [
     11,
     14
    ],
    [
     12,
     15
    ],
    [
     13,
     16
    ],
    [
     14,
     17
    ],
    [
     15,
     18
    ],
    [
     16,
     19
    ],
    [
     17,
     20
    ],
    [
     18,
     21
    ],
    [
     19,
     22
    ],
    [
     20,
     23
    ],
    [
     21,
     24
    ],
    [
     22,
     25
    ],
    [
     23,
     26
    ],
    [
     24,
     27
    ],
    [
     25,
     28
    ],
    [
     26,
     29
    ],
    [
     27,
     30
    ],
    [
     28,
     31
    ],
    [
     29,
     32
    ],
    [
     30,
     33
    ],
    [
     31,
     34
    ],
    [
     32,
     35
    ],
    [
     33,
     36
    ]
   ],
   "street": [
    [
     1,
     2,
     3
    ],
    [
     4,
     5,
     6
    ],
    [
     7,
     8,
     9
    ],
    [
     10,
     11,
     12
    ],
    [
     13,
     14,
     15
    ],
    [
     16,
     17,
     18
    ],
    [
     19,
     20,
     21
    ],
    [
     22,
     23,
     24
    ],
    [
     25,
     26,
     27
    ],
    [
     28,
     29,
     30
    ],
    [
     31,
     32,
     33
    ],
    [
     34,
     35,
     36
    ]
   ],
   "trio": [
    [
     0,
     1,
     2
    ],
    [
     0,
     2,
     3
    ]
   ]
  },
  "red": [
   1,
   3,
   5,
   7,
   9,
   12,
   14,
   16,
   18,
   19,
   21,
   23,
   25,
   27,
   30,
   32,
   34,
   36
  ],
  "tables": {
   "9730": {
    "basket": {
     "covers": 4,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 9
    },
    "black": {
     "covers": 18,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 2
    },
    "column": {
     "covers": 12,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 3
    },
    "corner": {
     "covers": 4,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 9
    },
    "dozen": {
     "covers": 12,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 3
    },
    "even": {
     "covers": 18,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 2
    },
    "high": {
     "covers": 18,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 2
    },
    "line": {
     "covers": 6,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 6
    },
    "low": {
     "covers": 18,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 2
    },
    "odd": {
     "covers": 18,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 2
    },
    "red": {
     "covers": 18,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 2
    },
    "split": {
     "covers": 2,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 18
    },
    "straight": {
     "covers": 1,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 36
    },
    "street": {
     "covers": 3,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 12
    },
    "trio": {
     "covers": 3,
     "exactReturn": {
      "den": "37",
      "num": "36",
      "pct": 97.297297
     },
     "paysTimesStake": 12
    }
   }
  },
  "hash": "173234716b9b7083169af89b8bdd1325105509c74d6c6e5d7ffb3db1d52ba1a1"
 },
 "servedOnTheKitAs": null,
 "storm": {
  "reading": {
   "fit": "fits with a cap",
   "template": "choice",
   "why": "one bet a spin fits; a list of several bets on one spin does not"
  },
  "note": "the `choice` template: one table of two rows per bet (36/covered numbers, 37 pockets). Its params are not published.",
  "checked": "not sent to Storm and not checked by Storm",
  "shapeFrom": null,
  "definitions": {}
 },
 "vectors": [
  {
   "actions": [],
   "case": "red",
   "draws": [
    [
     37,
     15
    ]
   ],
   "params": {
    "bet": "red"
   },
   "payX10k": 0,
   "result": {
    "bet": "red",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 15,
    "rtp": 9730,
    "sel": 0,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "0c5555575645238a243df130ae266fec7b4666ebc4d6337a90b5c9fd233a512a"
  },
  {
   "actions": [],
   "case": "red",
   "draws": [
    [
     37,
     24
    ]
   ],
   "params": {
    "bet": "red"
   },
   "payX10k": 0,
   "result": {
    "bet": "red",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 24,
    "rtp": 9730,
    "sel": 0,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "30546200dd3b9d05538eadc61060a7d95bbffee0f6a5f921f00b835c844205e5"
  },
  {
   "actions": [],
   "case": "red",
   "draws": [
    [
     37,
     13
    ]
   ],
   "params": {
    "bet": "red"
   },
   "payX10k": 0,
   "result": {
    "bet": "red",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 13,
    "rtp": 9730,
    "sel": 0,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "08003a4e7b3e0c0fdd03de053b5e642a6d60b76ba5feb33d56bdf92a6503b2d7"
  },
  {
   "actions": [],
   "case": "red",
   "draws": [
    [
     37,
     35
    ]
   ],
   "params": {
    "bet": "red"
   },
   "payX10k": 0,
   "result": {
    "bet": "red",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 35,
    "rtp": 9730,
    "sel": 0,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "3af4b6be679150f88b04d08d2b2ddde1e66423a5254a897c69336fa199551abe"
  },
  {
   "actions": [],
   "case": "straight 17",
   "draws": [
    [
     37,
     1
    ]
   ],
   "params": {
    "bet": "straight",
    "sel": 17
   },
   "payX10k": 0,
   "result": {
    "bet": "straight",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 1,
    "rtp": 9730,
    "sel": 17,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "76b823ef967dacb9fa0ea10cac89a107498badf458879a18bc54751895f1ec40"
  },
  {
   "actions": [],
   "case": "straight 17",
   "draws": [
    [
     37,
     32
    ]
   ],
   "params": {
    "bet": "straight",
    "sel": 17
   },
   "payX10k": 0,
   "result": {
    "bet": "straight",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 32,
    "rtp": 9730,
    "sel": 17,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "6dbab19cf6d9eb8591ba9d46a1e7d87a81a191e2faa20066e7908f15b31af26f"
  },
  {
   "actions": [],
   "case": "straight 17",
   "draws": [
    [
     37,
     36
    ]
   ],
   "params": {
    "bet": "straight",
    "sel": 17
   },
   "payX10k": 0,
   "result": {
    "bet": "straight",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 36,
    "rtp": 9730,
    "sel": 17,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "38c6a1b76db5cfbe61626bb44b60e090c6814138a7947525c5082207421d82d1"
  },
  {
   "actions": [],
   "case": "straight 17",
   "draws": [
    [
     37,
     27
    ]
   ],
   "params": {
    "bet": "straight",
    "sel": 17
   },
   "payX10k": 0,
   "result": {
    "bet": "straight",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 27,
    "rtp": 9730,
    "sel": 17,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "8937ead6a0d0c41912b4e248be8db0190efd3a9dcc38d3338cffb29533e4e063"
  },
  {
   "actions": [],
   "case": "dozen 2",
   "draws": [
    [
     37,
     34
    ]
   ],
   "params": {
    "bet": "dozen",
    "sel": 1
   },
   "payX10k": 0,
   "result": {
    "bet": "dozen",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 34,
    "rtp": 9730,
    "sel": 1,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "ccf68f9a132f5829bfb8409ad209d9cb10386c670a9c666b9ac959b21eda12b9"
  },
  {
   "actions": [],
   "case": "dozen 2",
   "draws": [
    [
     37,
     7
    ]
   ],
   "params": {
    "bet": "dozen",
    "sel": 1
   },
   "payX10k": 0,
   "result": {
    "bet": "dozen",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 7,
    "rtp": 9730,
    "sel": 1,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "0366881402ea9dfcfb83dc6093dafa8469861718c55aed6ab5e033cc71b34e84"
  },
  {
   "actions": [],
   "case": "dozen 2",
   "draws": [
    [
     37,
     35
    ]
   ],
   "params": {
    "bet": "dozen",
    "sel": 1
   },
   "payX10k": 0,
   "result": {
    "bet": "dozen",
    "done": true,
    "engine": "roulette",
    "payX10k": 0,
    "pocket": 35,
    "rtp": 9730,
    "sel": 1,
    "win": false
   },
   "rtp_bps": 9730,
   "seed": "c3cfb9dfc358984efb1ad922e456d3d13eeb08500a0b282ea06975ffd1db8373"
  },
  {
   "actions": [],
   "case": "dozen 2",
   "draws": [
    [
     37,
     22
    ]
   ],
   "params": {
    "bet": "dozen",
    "sel": 1
   },
   "payX10k": 30000,
   "result": {
    "bet": "dozen",
    "done": true,
    "engine": "roulette",
    "payX10k": 30000,
    "pocket": 22,
    "rtp": 9730,
    "sel": 1,
    "win": true
   },
   "rtp_bps": 9730,
   "seed": "1aff9ad9a32a2e8064e5a4fcb01b7af85f649d839c0c5cf63701c70599532fff"
  },
  {
   "actions": [],
   "case": "three bets",
   "draws": [
    [
     37,
     15
    ]
   ],
   "params": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ]
   },
   "payX10k": 7500,
   "result": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ],
    "done": true,
    "engine": "roulette",
    "payX10k": 7500,
    "pocket": 15,
    "rtp": 9730,
    "win": true
   },
   "rtp_bps": 9730,
   "seed": "5be1dac3274d72a399b9c78465ed3b1aa25ab9930aada7835a52e452eb470188"
  },
  {
   "actions": [],
   "case": "three bets",
   "draws": [
    [
     37,
     9
    ]
   ],
   "params": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ]
   },
   "payX10k": 17500,
   "result": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ],
    "done": true,
    "engine": "roulette",
    "payX10k": 17500,
    "pocket": 9,
    "rtp": 9730,
    "win": true
   },
   "rtp_bps": 9730,
   "seed": "ab93e7443aec8103be8fb7144ea5729279a1e7c36f9c056c49cac6c7d23303e8"
  },
  {
   "actions": [],
   "case": "three bets",
   "draws": [
    [
     37,
     1
    ]
   ],
   "params": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ]
   },
   "payX10k": 10000,
   "result": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ],
    "done": true,
    "engine": "roulette",
    "payX10k": 10000,
    "pocket": 1,
    "rtp": 9730,
    "win": true
   },
   "rtp_bps": 9730,
   "seed": "3bd12732915fde9c65ff8fc38332480def1521c61f14820176cf9e6550b9d78a"
  },
  {
   "actions": [],
   "case": "three bets",
   "draws": [
    [
     37,
     15
    ]
   ],
   "params": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ]
   },
   "payX10k": 7500,
   "result": {
    "bets": [
     [
      "red",
      0,
      2
     ],
     [
      "straight",
      7,
      1
     ],
     [
      "column",
      2,
      1
     ]
    ],
    "done": true,
    "engine": "roulette",
    "payX10k": 7500,
    "pocket": 15,
    "rtp": 9730,
    "win": true
   },
   "rtp_bps": 9730,
   "seed": "58ce37f70fbc5b3c1618dde9101304e00c009ecf306187f630f33f4ba9bdeb79"
  }
 ],
 "stepVectors": [],
 "stepVectorsAbout": null,
 "vectorsNote": null,
 "hashes": {
  "engine": "173234716b9b7083169af89b8bdd1325105509c74d6c6e5d7ffb3db1d52ba1a1",
  "engines": "f3d065f0ea262ac03fec189ebb45c0301b6d18163a1e19364e11cdfdd9ff61b9",
  "vectors": "0dffb893b425cc856d3e0eeac0b54ca6c9afa265e59c1038194326e08cc16add",
  "stormDefinitions": "c693c2bab5cec9d9c46b0b84638e5434fa7c8b49b6baa98db90ef55541e3f2cc"
 }
}
