cherdt / BingoCardGenerator

A bingo card generator
21 stars 10 forks source link

Frequent request: a way to call words/phrases #4

Open cherdt opened 9 years ago

cherdt commented 9 years ago

Basically, sampling without replacement from the list used to create the cards. Probably just use array.splice. Maybe add a button to the page that sends the creator to another page?

cherdt commented 9 years ago

Example:

var list = ["alpha","beta","gamma","delta"], i, word;
for (i = 0; list.length > 0; i = i + 1) {
    word = list.splice(Math.floor(Math.random()*list.length), 1);
    console.log(word);
}
cherdt commented 8 years ago

Done (but not yet linked from the main bingo form): http://osric.com/bingo-card-generator/call-generator.html