min = 0;
}
if (!Random.rand)
- Random.setSeed(Math.floor(Math.random() * 1984));
+ Random.setSeed(Math.floor(Math.random() * 19840));
return Math.floor(Random.rand() * (max - min)) + min;
},
const rand = Random.randInt(index, arr.length);
[ cpArr[index], cpArr[rand] ] = [ cpArr[rand], cpArr[index] ];
}
- return cpArr.slice(0, n);
+ const res = cpArr.slice(0, n);
+ return (n >= 2 ? res : res[0]);
},
shuffle: function(arr) {