From 53e48ed69a3f972b43229cd79dc4fbc81a58b540 Mon Sep 17 00:00:00 2001 From: NewHappyRabbit Date: Tue, 18 Feb 2025 09:38:50 +0200 Subject: [PATCH] Changed math.random() to nextint --- src/core/PseudoRandom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PseudoRandom.ts b/src/core/PseudoRandom.ts index 4fa8619f8..985de26fd 100644 --- a/src/core/PseudoRandom.ts +++ b/src/core/PseudoRandom.ts @@ -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]]; }