The seed should be the same for a given opponent pairing, but different between opponents, right?
Possible, yes. For a given opponent, yes it’s the same. But it was not the case before : it changed each time I changed my code, or I reloaded the page.
I don’t check if it’s the same for different opponent.
The avantage is that we can really see the impact of our code changes.
The inconvénient is that it’s difficult to check if the code is robust or not.
Is there a way to force a new seed ? Calling random() at the beginning of the code ?
Yes, you can call Math.random()
in your code to affect the random seed thereafter.
Works great, thanks.