Skip to content

When competitors are asked interesting questions: about important (and unimportant) facts, in many subjects

License

Notifications You must be signed in to change notification settings

ricklyman/triviaGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

triviaGame

When competitors are asked interesting questions: about important (and unimportant) facts, in many subjects

(https://triviacards.glitch.me/)

##The model:

You decide to start a card game with some friends. You are acting as the dealer. You open a new deck. You shuffle the deck, several times. During the game a player complains that the cards were not properly shuffled. You shuffle the deck, again, several times. Is there any downside to shuffling more than once?

Still acting as the dealer, you decide to modify the game. You choose a category (eg card games), you add a trivia question to each card. You shuffle the deck, several times. You read from the top of the deck. If the player can answer the question they receive the card. The card is removed from the deck if they cannot.

The player with the most cards, when the deck is "empty", wins the game. Still acting as the dealer, you decide to modify the game. You choose another a category (eg true or false), you add a trivia question to each card. You color code the categories for future randomization of the categories. etc etc

Eventually you run out of room, on the cards, to add any more categories, and questions. You make lists for each category. You randomly choose a category, which happens to have 20 questions.. You number each question/answer combination: 1-20. You open up a new deck of cards. You pull 20 cards and number them 1-20. You play the game, as above. You use the number on the card to look up the question/answer. If the player can answer the question.... etc etc arrayQ = the questions arrayA = the answers arrayR = the cards (numbered from 0-19 using the category, above). arrayR is intentionally shuffled more than once. arrayR[0] is the first card dealt.

Perhaps the value at index 0, in this example, is the number 13. Question/Answer 13 is used. etc etc

Alt text

About

When competitors are asked interesting questions: about important (and unimportant) facts, in many subjects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published