Need help with making this black jack game in C++: Here are the instructions: Th
ID: 3775669 • Letter: N
Question
Need help with making this black jack game in C++:
Here are the instructions:
This program simulates the following simplified black jack game. Every card must be drawn randomly. Initially this program will draw two cards for you and the dealer from a fresh deck. The program will turn two cards face up for you and turn one card face up and turn one card face down(hidden card) for dealer. Whenever the sum of the displayed cards number is less than 21, you can decide whether you will have one more card or not. The game continues until you decide to stop to have a card or your sum is over 21. After that, if you have not busted, the dealer must have a card until the sum of the cards is 17 or more. You win by not busting and having a total higher than the dealer's. The dealer loses by busting or having a lesser total than yours. If you and the dealer have the same total, then TIE. If both you and the dealer bust, then the dealer win.
This assignment has to use a class inheritance.
Input
Input will be given using the interactive way using a keyboard.
The input is a user-supplied positive integer to seed the random number generator.
Rule
To calculate your score(total),
Ace is +1 or +11 (The dealer’s ace is always counted as 11. However, if the dealer’s total is over 21, ace is counted as 1.)
10, jack, queen, king : +10
2 to 9 : + its value.
This simplified blackjack game have no split, no double, or no insurance.
Output
The followings are the prompt for the input:
Please supply a positive integer to seed random numbers:
The program then outputs a blank line, followed by a description of each card drawn:
Note: <value> is one of 2 through 10, J, Q, K, or A. <suit> is one of Hearts, Diamonds, Spades, or Clubs.
DEALER’S CARDS
<value><suit>
HIDDEN CARD
YOUR CARDS:
<value><suit>
<value><suit>
YOUR TOTAL is XX.
"Congratulation!! It's a BLACKJACK.", (if it is a blackjack, display this message and you won.)
Can I draw another card for you now? (Yes/No) (when it is not blackjack.)
(where if your answer is Y/y, display the following output)
NOW YOUR CARDS:
<value1> <suit1>
<value2> <suit2>
<value3> <suit3>
YOUR TOTAL is XX.
Can I draw another card for you now? (Yes/No)
(We will repeat it until you type N/n or until your total is over 21. If your total is over 21, display “YOU HAVE BUSTED!))
DEALER’s CARDS:
<value1> <suit1>
<value2> <suit2>
<value3> <suit3>
…
Display
Dealer’s TOTAL is XX or “BUST!”
Display
YOU or DEALER WON!
Do you want to play again?( (Yes/No)
Explanation / Answer
#include "stdafx.h"
#include "Blackjack.h"
Blackjack::Blackjack()
void Blackjack::playGame()
one + (rand() the troubles 11);
phandSize++;
}
else