C++ final project
Discipline Computer Science
Assignment type : Code
Video Poker Simulation
Acme Software, Inc, has been contracted to write a Video Poker Simulation game in basic C++ that follows the following rules:
The player places an initial bet between one (1) and fifty (50) coins, where each coin is worth $5.00. The player is then dealt five (5) cards and allowed to choose which cards, if any, they wish to keep. The cards that they do not wish to keep are discarded, and replacement cards are dealt so that they again have a total of five (5) cards. The computer then determines what amount they have won, if any.
Card Ranks and Suits:
Cards are ranked, from highest to lowest:
(Ace can count as either low or high. See “Royal Flush”‘s scoring, below.)
The card suits are: Hearts, Clubs, Diamonds, and Spades
When you are dealt replacement cards for your discards, your new hand is evaluated. Based on what kind of hand you’re holding, you’ll receive a certain number of points.
Hands are listed below, from best (highest scoring), to worst (no score):
- Royal Flush – 400 coins
A straight flush, with the Ace high.
In other words, a Ten, Jack, Queen, King and Ace, all of the same suit.
- Straight Flush – 50 coins
A straight flush.
In other words, all five cards are consecutive and are the same suit.
For example: Three of Clubs, Four of Clubs, Five of Clubs, Six of Clubs and Seven of Clubs.
- Four of a Kind – 25 coins
Four cards of the same value. (Obviously, each of different suits.)
- Full House – 8 coins
A three of a kind and a pair at the same time.
- Flush – 5 coins
All cards in your hand are the same suit.
- Straight – 4 coins
All five cards are consecutive.
For example: Three of Clubs, Four of Spades, Five of Clubs, Six of Diamonds, and Seven of Hearts.
- Three of a Kind – 3 coins
Three cards of the same value.
- Two Pair – 2 coins
Two pairs of cards.
In other words, two cards in your hand are the same value, and two other cards in your hand are also the same value.
- Pair – 1 coins
Two cards in your hand are the same value. In this version, they must be Jacks or better!
- None of the Above – 0 coinss
Each turn “costs” a minimum of $5 (1 coin = $5), so if you get a pair, no money actually ends up added to your total score. If you don’t get anything, you actually lose a coin ($5)! If you bet more than one 5 dollar coin, then the returns above are multiplied by the number of coins entered to give the actual yield. This is just how handheld and Vegas video poker games actually work!
Your project must meet the following specifications:
- Text-based display of what is in the player’s hand.
- Read all cards to be discarded at once
- Read from the command line as a program parameter the name of a file that contains the state of a previous game so that a player can resume a game at any point. Thus, your program must read and write to a file as well as verify that a file exists.
- Provided adequate “help” for the player on how to play the game.
- Score all hands correctly.
- Know the player’s name and be “friendly”
- (100 points) Mouse and graphical input
- (50 points) Sound / music
- (50 points) “Dueces Wild” Same as above, but with each of the “Dueces” (a two) being a “Wild Card.” Your program then must calculate the highest return that each two will yield the player.
Academic Level: Undergraduate/Bachelor
Volume of 1100 – 1375 pages (5 pages)
Type of service: Custom writing