Question: Black-Jack Assignment ? C program) For this last assignment, we will be writing a program that two people can use to play a game of

Black-Jack Assignment ? C program)

For this last assignment, we will be writing a program that two people can use to play a game of BlackJack!

NOTE: There should be THREE players. Two regular players AND the dealer, as the dealer also gets dealt a hand in Black-Jack.

Black-Jack Assignment ? C program) For this last assignment, we will bewriting a program that two people can use to play a gameof BlackJack! NOTE: There should be THREE players. Two regular players AND

You should create the following structs: STRUCTS+ dealer struct: represents the card dealer in a game of black-jack* members: deck of_cards- array that can be used to store values representing different cards (there are 52 cards in a deck of cards)v cards_used - another array used to represent whether or not a particular card in the deck has been handed to a player (you could use the value 0 to indicate that a particular card is still available and 1 to indicate that it has already been handed out)- remaining_ cards - a single numeric value representing how many cards are still available to be handed out in the deck player struct pointer - since the dealer is also a player, this struct represents the dealer's cards+ player struct: represents a single player in a game of black-jack* members: hand - an array representing all of the cards that a player is holding in their hand* how_many- a single numeric value representing how many cards this player has in their hand FUNCTIONS shuffle resets remaining_cards to the whole deck and cards_used to all O's, and resets each player's hand info (including the dealer) so that they have no cards. parameter: player struct pointer, player struct pointer, dealer struct pointer initial_deal pass out first 2 cards to each player and the dealer parameters: player struct pointer, player struct pointer, dealer struct pointer* should give 1 card at a time to each player until all cards have been handed out+ To give a single card to a player or the dealer, you should: randomly pick a # between 0 and 51, then check to see if that card has been handed out yet if not, + hand it to a player, update cards used update remaining cards- update player's hand+ update how many cards player is holding* if so, keep checking until you find a card that hasn't been given out yet+ You should create the following structs: STRUCTS+ dealer struct: represents the card dealer in a game of black-jack* members: deck of_cards- array that can be used to store values representing different cards (there are 52 cards in a deck of cards)v cards_used - another array used to represent whether or not a particular card in the deck has been handed to a player (you could use the value 0 to indicate that a particular card is still available and 1 to indicate that it has already been handed out)- remaining_ cards - a single numeric value representing how many cards are still available to be handed out in the deck player struct pointer - since the dealer is also a player, this struct represents the dealer's cards+ player struct: represents a single player in a game of black-jack* members: hand - an array representing all of the cards that a player is holding in their hand* how_many- a single numeric value representing how many cards this player has in their hand FUNCTIONS shuffle resets remaining_cards to the whole deck and cards_used to all O's, and resets each player's hand info (including the dealer) so that they have no cards. parameter: player struct pointer, player struct pointer, dealer struct pointer initial_deal pass out first 2 cards to each player and the dealer parameters: player struct pointer, player struct pointer, dealer struct pointer* should give 1 card at a time to each player until all cards have been handed out+ To give a single card to a player or the dealer, you should: randomly pick a # between 0 and 51, then check to see if that card has been handed out yet if not, + hand it to a player, update cards used update remaining cards- update player's hand+ update how many cards player is holding* if so, keep checking until you find a card that hasn't been given out yet+

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!