mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:00:43 +00:00
Changed math.random() to nextint
This commit is contained in:
@@ -50,7 +50,7 @@ export class PseudoRandom {
|
||||
|
||||
shuffleArray(array: any[]) {
|
||||
for (let i = array.length - 1; i >= 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
const j = Math.floor(this.nextInt(0, i + 1));
|
||||
[array[i], array[j]] = [array[j], array[i]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user