update & refactor MapPlaylist: remove big/small map distinction, ensure no map is repeated within 5 rounds, update how map is shuffled

This commit is contained in:
evan
2025-05-05 10:55:53 -07:00
parent 2e9c393744
commit cea6e0bc11
3 changed files with 107 additions and 128 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ export class PseudoRandom {
return this.nextInt(0, odds) == 0;
}
shuffleArray(array: any[]) {
shuffleArray(array: any[]): any[] {
for (let i = array.length - 1; i >= 0; i--) {
const j = Math.floor(this.nextInt(0, i + 1));
[array[i], array[j]] = [array[j], array[i]];