diff --git a/lib/sandbox.js b/lib/sandbox.js index 82149cf..571feee 100644 --- a/lib/sandbox.js +++ b/lib/sandbox.js @@ -54,11 +54,15 @@ class SandboxDate { function random() { if (!state.rng) - state.rng = seedrandom(state.sessionContext.timestamp); + state.rng = seedrandom(state.sessionContext.deviceId); return state.rng(); } +random.seed = function(s) { + state.rng = seedrandom(s); +} + class ParameterWrapper { constructor(path, attributes, unpacked, unpackedRevision) {