Const
Per-instance seedable RNG, stored on the Phaser game registry so any scene can opt into determinism by reading it.
Usage from a scene:
import { getRandom } from 'clik-engine'; const rng = getRandom(this); const dmg = rng?.nextInt(5, 10) ?? randomInt(5, 10);
Falls back to null (and the caller to bare Math.random) when not running under the harness, so production gameplay is unaffected.
null
Per-instance seedable RNG, stored on the Phaser game registry so any scene can opt into determinism by reading it.
Usage from a scene:
import { getRandom } from 'clik-engine'; const rng = getRandom(this); const dmg = rng?.nextInt(5, 10) ?? randomInt(5, 10);
Falls back to
null(and the caller to bare Math.random) when not running under the harness, so production gameplay is unaffected.