Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please provide code in language data strcucture and algorithm development in C in visual studio coding should use basic linked list method to perform actions
Please provide code in language data strcucture and algorithm development in C in visual studio
In this assignment, you are asked to apply this knowledge and skill to complete th Blackjack game as described below. In your program, you should have 3 linked lists of cards: -- Deck starts with 52 cards - PlayerList starts with 0 cards for the player -- DealerList starts with 0 cards for the dealer When the game starts, 2 cards are removed from the Deck and added to the PlayerList, and 2 other cards are removed from Deck and added to DealerList. You should implement two functions for this purpose: -- DealToPlayer(): This function remove one card from Deck and add it to the PlayerList -- DealToDealer(): This function remove one card from Deck and add it to the DealerList Once the game has begun, your program should start a infinite loop of asking the user to choose between "Hit" or "Stand". Every time the user choose Hit, your program should: - Call DealToPlayer() to move one card from Deck to PlayerList - Calculate the player sum by adding the blackjack values of all the cards in the PlayerList - DealloPlayer(): This function remove one card from Deck and add it to the PlayerList -- DealToDealer(): This function remove one card from Deck and add it to the DealerList Once the game has begun, your program should start a infinite loop of asking the user to choose between "Hit" or "Stand". Every time the user choose Hit, your program should: -- Call DealToPlayer() to move one card from Deck to PlayerList - Calculate the player sum by adding the blackjack values of all the cards in the PlayerList - If the sum is >21, prints "Player Busted" and end the game. - If the sum is =16 and coding should use basic linked list method to perform actions and simple code is required.
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