Question: Project 2 : Blackjack Write a C program that simulates a game of blackjack between you and a virtual dealer. You only need to make
Project : Blackjack
Write a C program that simulates a game of blackjack between you and a virtual dealer. You only
need to make one of the two projects.
To simplify the game, well make changes to the rule set.
Assume only one player and the dealer.
Aces can ordinarily be worth or points. In our game they can only be worth
Assume that ties result in the player getting their bet back.
Heres a detailed step by step on how your game should be played.
Run the game with blackjackexe, or blackjackexe load with load passed as a
command line argument to signal you want to load a previous game.
a If load is passed, load dealer and player hands, the deck, the chips, and the
bet, then skip to step
The player is given chips.
The player is asked to make a bet. They type in a number, or to make no bet and
leave the casino with their earnings.
The player and dealer are dealt two cards each.
If the player is dealt they receive x their bet, a new round is immediately started.
The player is shown their cards, current score, dealers first card, and asked if they want
to hit by typing h stay by typing s or take a break and save the game by typing b
a Hit deals the player a card and starts a new round
b Stay ends the round
c Break saves the game in a file and exits the program just call exit;
If the player has more than round ends.
At the end of the round, if the dealer has less than points, they draw another card. Then the
round is resolved in one of the following ways.
If both player and dealer have more than or if they tie in any way round ends and no
chips are lost.
If only the player has more than chips, they bust, lose the bet.
If the dealer has more than points or less than the player, round ends, and the player
gains x the bet.
If the dealer has a higher score, the player loses their bet.
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
