Fix computer moves randomness, rename random() into randInt()
[vchess.git] / client / src / variants / Wildebeest.js
index 509586a..d0baa6f 100644 (file)
@@ -247,19 +247,19 @@ class WildebeestRules extends ChessRules
                                positions.splice(idx, 1);
                        }
 
-                       let randIndex = random(7);
+                       let randIndex = randInt(7);
                        let knight1Pos = positions[randIndex];
                        positions.splice(randIndex, 1);
-                       randIndex = random(6);
+                       randIndex = randInt(6);
                        let knight2Pos = positions[randIndex];
                        positions.splice(randIndex, 1);
 
-                       randIndex = random(5);
+                       randIndex = randInt(5);
                        let queenPos = positions[randIndex];
                        positions.splice(randIndex, 1);
 
                        // Random square for wildebeest
-                       randIndex = random(4);
+                       randIndex = randInt(4);
                        let wildebeestPos = positions[randIndex];
                        positions.splice(randIndex, 1);