begin, ask the user which of the games they rould like to play. lackjack: The game opens by creating a deck of 52 cards and 2 empty hands (the player and computer hands). Initial Deal: Deal 2 cards to each hand (the ployer and computer). Take the top card from the deck and add it to the player hand, remove that card from the deck. Then deal the next top card from the deck and add to the computer hand and remove tha card from the deck and repeat. Thus, dealing 4 cards. Player turn: Display the players cards and their hand total and ask if they would like another card. If so, take the top card from the deck and add it to the player hand. remove that card from the deck. Calculate the new player total and display that value and repeat, until the player does not want another card. If the player's hand total exceeds 21 , they automatically lose. Dealer turn: The computer must deal a card if the sum of the cards in their hand is 17. If the computer's hand total exceeds 21 , it automatically loses. Evaluate who won the game (whoever has the highest value that did not exceed 21 ). If the player and the dealer end up with the some hand total, then this is called a PUSH NOTES: a) Aces in blackjack can count for 1 or 11. Initially they should count as 11, but if the player goes over 21 , change the value of the ace to 1.
b) If the player would like to play again, a new deck should be created c) Display of the special characters and updating the color of the console is not difficult, but counts as extra credit. You may choose to write out the suit of the card insted. Sample run: Craps: The simplified rules of this game are bosed on the rolling of 2 six sided die. if 7 or 11 -you win if -you lose all others estoblish 'point' keep rolling until: point - you win -you lose These are the same rules established when done in class during week 1. There is an additional twist to allow the user to bet on the outcome of their craps game. The player gets a starting bet of and can wager a bet based on this maximum amount. The player cannot bet more than his/her worth, and once his/her worth is , the game must end. Otherwise, you can continue to prompt the player to go again. When the player chooses to quit (before running out of money). please display the player's worth.
Hangman: The pseudocde done in class is sufficient for this game. You will read a list of words, (see the list here: words,txt) store them in a vector, and then randomly choose a word from the list. You will need to create a "guessWord' that contains either? or_for each character in the chosen word. The user will guess the letter until they run out of their 6 guesses the guess word equals the chosen word. Sample Output
These games could mostly be written from pseudocode written in class. Your final game can be either Tic Tac Toe or War.
War The basic goal of this game is for the player or the computer to get all the cards. To start: a. Create the deck, shuffle the deck and deal all of the cards to the player and computer hands. b. Each player will show their 'top' card. a. Compare players' card value (Do not consider the color and pattern) b. The player that has the higher value revealed card takes both cards on the desk and place those cards facing down at the bottom of his/her own deck. c. If the computer the player revealed cards with same value, this starts "War". c. War play a. When the war begins, both players place their next 3 cards from the top of his/her own deck in the 'hold' hand. b. Then, each player will show their 'top' card and the comparison is done to win or lose. c. The player with the highest value card wins all the cards (the initial tied cards, the 6 cards placed "face down' and the last two cards shown, for a total of 10 cards. d. If there is a tie. War is initiated again. d. The players continue to reveal the top card of their deck until a winner is declared. The player to reach a total of 52 cards is the winner. Because the program will run excessively long at times, I suggest you declare a winner when one player has less than 10 cards (the opposing player wins). Otherwise, if one player is not able to complete the "war" (do not have enough cards to complete the "war"), this player loses the game, and the other player wins Sample output:
- Display of the special characters for the card deal and updating the color of the console for Blackjack (and War if you choose to do this). 15 points - You may choose to do both Tic Tac Toe AND War. 20 points