Skip to content

makeSeededRng

makeSeededRng(seed): SeededRng

Defined in: src/modules/rng/rng.ts:25

Deterministic [0, 1) generator (mulberry32). The same seed always yields the same sequence, so games can record a seed for replays and tests can assert exact outcomes. Save state mid-sequence to put it in a save file, and assign it back to resume. Not cryptographically secure.

number

SeededRng