CSE 111 - Fall 2002
Lab #10 - Poker
Background
For this lab, you will build the game of 5 card stud poker. The user will play against the computer dealer. When the page opens, the user starts with a sum of money. There are five cards dealt to the user which the user can see and five dealt to the dealer, which the user can not see initially. The player then inputs an amount of money to bet on the hand depending on if they feel they can beat the dealer with their hand. Then, the dealers hand is revealed, and the winner is announced, and money awarded to the user if they did beat the dealer. The amount of the bet is subtracted if the dealer wins. Play continues in this manner until there are no more cards in the deck to be played.
Below is a list of winning hands - the lower on the list, the better the hand. For example, a full house beats a pair. Note, that for this implementation, if the dealer has a pair of 5's and the user has a pair of 2's, there should be a draw declared, and no money should change hands.
Extra Credit
For additional credit, you can implement a smarter scoring system. For example, the pair of 5's should beat a pair of 2's, and a full house of 3Qs and 2 fours will be a full house of 3 sevens and 2 fives. Another option is to implement seven card stud poker. In this game, both the user and the computer will be dealt seven cards, but only the best five cards will count for scoring.
Sample Interaction
Below is a sample interaction that you may use as a guide for how to implement the game.




