Shuffle groups

This commit is contained in:
2025-09-09 12:57:35 +03:00
parent c79a365a72
commit 51aa2e68dc

View File

@ -243,6 +243,12 @@
bitPosition++;
}
// Shuffle the groups to make it more mysterious
for (let i = generatedGroups.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[generatedGroups[i], generatedGroups[j]] = [generatedGroups[j], generatedGroups[i]];
}
return generatedGroups;
}