2 ms·
The RNG was supposed to generate a random number in [0, sum of weights] not [0, num_players]. It's also possible to write a test for this where the behavior in
by rcme 4y ago
The RNG was supposed to generate a random number in [0, sum of weights] not [0, num_players].
It's also possible to write a test for this where the behavior in the test accurately tests the wrong behavior. The error is pretty subtle. There was even a “bug” in your summary of the bug ;)