After months of playing a card game that involves constant data recording & calculations, I decided to build a web interface to handle the chore for me.
1. ENTER PLAYER NAMES
Users are presented with an input field to add players' names for their game. When at least two have been entered, they can proceed to Step 2.
2. CHOOSE GAME LENGTH
The user can enter a number from 1-20 depending on how many hands they would like to play. Error handling on this form prevents letters, decimals, or outside numbers from being entered.
3. START PLAYING!
Based on the number of hands the user decided to play, the sequence of cards-per-hand is displayed in the CARDS column. The first dealer (in this case Ryan) would shuffle and distribute number in the CARDS column upside-down to each of the players in a clockwise direction around the table. After each player has that number of cards (in this case 10), one final card is flipped right-side-up and placed on top of the deck in the middle of the table. The suit of that card (diamonds, hearts, clubs, or spades) is called the TRUMP and can beat any other suit and any lower value TRUMP cards.
The game begins by each player wagering how many of the cards in their hand they will win. The person to bet first is the person sitting clockwise from the dealer, and he or she may bet any number out of the total number of cards dealt (including 10/10, if the cards look that good!).
NOT SO FAST THOUGH: the total number of wagers cannot be equal to the number of cards everyone is holding; you must be collectively over-bid or under-bid (e.g. players bet they will collectively win 9/10 cards or 11/10 cards). This means that after the cards are played and won (next chapter), someone will not have scored the number of cards they wagered they would win.