Question: Homework 9 B: DUELING BLACKJACK BlackJack Twixt 2 Players plus 1 Dealer Program 9 - 1 simulates pulling cards from a deck and Program 9
Homework B: DUELING BLACKJACK
BlackJack Twixt Players plus Dealer
Program simulates pulling cards from a deck and ProgramB see attached simulates a single player playing BlackJack against a dealer.
Enhance this approach by creating a BlackJack game between two virtual players. This particular version is called: Dueling BlackJack. The cards have the values given in Program and ProgramB with the following caveat:
Aces will take the value of as long as the sum total of the cards in a person's hand does not exceed
o If the sum total does exceed the Ace will take the value of
Call your program
YourNameHwrkBpy
Every time a new game is begun, your name should appear first, at the top, showing whose casino the players are playing at
DUELING BLACKJACK: Here are the Rules
The program should deal cards to each player, one card at a time, until one player's hand is worth more than points.
Each time one card is given to each player, this is called a deal eg deal deal etc.
When, in a particular deal, one person's hand exceeds the other player is declared the winner. The game is over.
When one person attains a score of exactly points, that person will receive no further draws. The other player will continue to receive draws until she exceeds or gets the score of
The players have no choice here, they must accept a hit or not according to this rule.
If both players get a score of then the outcome is a Tie Score and both players win. This is the one instance in which the Dealer is said to lose.
It is possible that both players' hands will simultaneously exceed points, in which case neither player wins, hence the Dealer is said to win.
Remember, If a player is dealt an ace, the program decides the value of the card according to the following rule:
The ace will be worth points, unless that makes the player's hand exceed points. In that case the ace will be worth point
Tips for Insuring Cards are Dealt Randomly
You will want to use the Random function to ensure that your cards are selected randomly.
For example, when a player receives a card from the dealer, there are three steps involved:
The first step ensures that a particular card is chosen randomly from the deck.
The second step removes that card from the deck, and it is given to the player.
The third step adds that card's value to the player's current hand.
Homework B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #
Homework B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #
Homework B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #Both Hand & Hand Lose, only the Dealer Wins!
Homework B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #Both Hand and Hand Win!
Homework B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #Both Hand and Hand Win!
Homework B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #Both Hand & Hand Lose, only the Dealer Wins!
does the program give you the correct result when hand wins?
does the progrsm give you the
correct result when hand wins
does the program give the correct reseult when both hands exceed
does the progrsm skip desling an additional card to hand thay already has
does program make ace when the total is
does the program make ace when the total would be greater than otherwise
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
