-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I was working to add the option to load questions from predefined lists and I noticed your routine doesn't limit the number of entries. Typically Bingo games are either 75 balls or 90 balls (https://en.wikipedia.org/wiki/Bingo_(American_version)). So I recommend shuffling the entries array and slicing it at 75 so the expected "win rate per card" matches expectations.
if (entriesArray.length < 24) {
document.getElementById("entryTextArea").setCustomValidity("A game requires at least 24 entries, one per line!");
isValid = false;
}else if (entriesArray.length > 75){
// Typical games are 75 or 90 ball Bingo balls, so limit range to those. Scramble array then truncate
shuffleArray(entriesArray);
entriesArray = entriesArray.slice(0, 74);
} else {
document.getElementById("entryTextArea").setCustomValidity("");
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels