Card packs from two decks. A pack is 5 cards without replacement; per rarity it pays count × value × multiplier(count), an exact hypergeometric sum. Each bet type draws the low deck with the one probability that makes E[win] ÷ cost equal the RTP. Reproduces Math-rippin-rumble-ver4.xlsx.
Loading ALGORITHM.md…
The engine is published as an ES module that implements the RGS provider contract and rolls locally with crypto.getRandomValues: open, valid-bets, bet, collect, with the observed balance semantics (bet debits the stake, collect credits the win, integer minor units). No server, every round live, and any round replays from its seed. Bet types: BASE, BOOSTED, BASE_BUNDLE, BOOSTED_BUNDLE.
import { createGame } from 'https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/rgs.js';
const g = createGame({ preset: 'sheet-v4' }); // presets: sheet-v4, sheet-v4-0.93, sheet-v4-0.97
// bet types: BASE, BOOSTED, BASE_BUNDLE, BOOSTED_BUNDLE
const s = g.open(); // session, balance 100000, chipLevels [1000,2000,5000,10000]
const r = g.bet({ sessionId: s.sessionId, betAmount: 1000, betType: 'BOOSTED' }); // fresh crypto seed; win in r.totalWinAmount
g.collect({ roundId: r.roundId }); // credits the win → { balance }
// Replay any fixture: same seed, same code path, same answer as rounds/007.json
g.bet({ sessionId: s.sessionId, betAmount: 1000, betType: 'BOOSTED', seed: 'fixture-007' });
Presets: sheet-v4, sheet-v4-0.93, sheet-v4-0.97 (default sheet-v4). Each preset is a frozen configuration and its own folder: the config, derived tables and settlement rule in field.json, plus one hundred pre-drawn rounds from seeds fixture-000 … fixture-099 settled for every bet type. The same seed drives every preset, so round 007 uses the same u everywhere, and the live module reproduces any of them when given the seed.
# presets, their parameters, bet types and realised RTP over the 100 rounds
curl -s https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/index.json
# one preset: parameters, tables (bands / odds / ladder / decks), RN intervals, how to settle
curl -s https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/sheet-v4/field.json
# one round (000–099): seed, full outcome, settlement for every bet type
curl -s https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/sheet-v4/rounds/007.json
# all 100 rounds of a preset (stake and win per bet type)
curl -s https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/sheet-v4/rounds.json
# round 007 played through the real calls: request bodies and every response
curl -s https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/sheet-v4/sample-request.json
curl -s https://danvid1009.github.io/gnarone-game-math/rip-rumble/api/sheet-v4/sample-response.json
Settlement rule is spelled out in each preset's field.json under how_to_settle.

git clone https://github.com/Danvid1009/gnarone-game-math.git
cd gnarone-game-math/rumble-engine
npm test
node bin/build-rumble.js