()
| 5 | // This is a simple "good enough" PRNG. |
| 6 | var initialSeed = Math.random() * Math.pow(2, 32) + Date.now(); |
| 7 | function prng() { |
| 8 | var seed = initialSeed; |
| 9 | return (a, b) => { |
| 10 | seed = Math.pow(seed, 2) % 94906249; |
| 11 | return seed % (1 + b - a) + a; |
| 12 | }; |
| 13 | } |
| 14 | |
| 15 | describe('Modify PRNG', () => { |
| 16 | it('Should generate the same string with the same the PRNG seed', () => { |