November 2017
Beginner
294 pages
6h 55m
English
To have a chance of replaying value or being able to compare scores between people, we really need a pseudo–random number generator. The basic JavaScript Math.random() is not a pseudo–random generator; it really gives you a totally random number every time. We need a pseudo–random number generator that takes a seed value. If you give the same seed to the random number generator, it will generate the same sequence of random numbers. (They aren't completely random, but are very close.) Random number generators are a complex topic; for example, they are used in cryptography, and if your random number generator isn't completely random, someone could break your code.
We aren't so worried about that, ...
Read now
Unlock full access