Play against computer almost OK: need to fix Board component
[vchess.git] / client / src / utils / alea.js
index 337b25f..76d9c38 100644 (file)
@@ -22,7 +22,7 @@ export function sample (arr, n)
   let cpArr = arr.map(e => e);
   for (let index = 0; index < n; index++)
   {
-    const rand = getRandInt(index, n);
+    const rand = random(index, n);
     const temp = cpArr[index];
     cpArr[index] = cpArr[rand];
     cpArr[rand] = temp;