Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this task you will implement a game of blackjack between a single player and an automated dealer. Background Let's now talk about how a
In this task you will implement a game of blackjack between a single player and an automated dealer.
Background
Let's now talk about how a round of blackjack actually plays out. For the sake of simplicity, we will focus on how the game works when there is only a single player, and when the game only lasts for a single round, and when there are no bets involved.
A round of blackjack with a single player involves the following steps:
The initial deal
The dealer deals one card to the player, and then one to themselves. These cards are all dealt face up meaning that everyone can see the cards
The dealer then deals a second card to the player, and a second one to themselves. The player's card is dealt face up but the dealer's one is played face down.
Resolving naturals
If the dealer's first card is an jack, queen or king or ace, they will privately look at their second card to see if they have a natural pair ie a pair of cards with a score that is exactly
If the dealer does not have a natural pair, then play moves on to the players turn.
Otherwise, play immediately stops. If both the player and the dealer have natural pairs, the game ends in a tie. If only the dealer has a natural pair, then the dealer wins.
The player's turn
The player chooses to hit or stay.
If they choose to stay, then play moves on to the dealers turn.
If they choose to hit and go bust, then play immediately stops and the dealer wins.
If they choose to hit and do not go bust, they again choose to either hit or stay. They can continue to make this choice until they eventually go bust or choose to stay.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started