Answered step by step
Verified Expert Solution
Link Copied!

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 10, jack, queen or king or ace, they will privately look at their second card to see if they have a natural pair (i.e. a pair of cards with a score that is exactly 21).
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

2. Write two or three of your greatest weaknesses.

Answered: 1 week ago