diff --git a/src/generators/arc4.ts b/src/generators/arc4.ts index 7523e9c..deddefb 100644 --- a/src/generators/arc4.ts +++ b/src/generators/arc4.ts @@ -54,7 +54,7 @@ export class ARC4RNG extends RNG { // For more robust unpredictability, the function call below discards an // initial batch of values. This is called RC4-drop. - this.g(768) + this.g(256) } override get name() { diff --git a/src/seed.test.ts b/src/seed.test.ts index b28559e..0fbef75 100644 --- a/src/seed.test.ts +++ b/src/seed.test.ts @@ -29,16 +29,16 @@ test('random.clone with string seed is consistent', () => { test('Random constructor', () => { const rng = new Random() - expect(rng).toBeDefined() + expect(rng.rng.name).toEqual('Math.random') const rng2 = new Random(seedrandom('my-seed-string')) - expect(rng2).toBeDefined() + expect(rng2.rng.name).toEqual('prng') const rng3 = new Random(Math.random) - expect(rng3).toBeDefined() + expect(rng3.rng.name).toEqual('random') const rng4 = new Random('example-seed-string') - expect(rng4).toBeDefined() + expect(rng4.rng.name).toEqual('arc4') }) test('random seed consistency', () => {