Question: C++ Question. Data Structures Problem 1: Create a linked list of shuffled deck of 52 decks cards without duplicates. Each node of the list represents

C++ Question. Data Structures

Problem 1: Create a linked list of shuffled deck of 52 decks cards without duplicates. Each node of the list represents a card suit and a rank. Note: Create a deck of 52 cards without duplicates using a struct deckCard{ int cardRank, string cardSuit}; and create 52 such objects and fill the data members. Also swap the cards in a random order to make it shuffled.

Problem 2: From previous shuffled deck of card create a list having first card swap with last and second with second last and so on.

Problem 3. Create a circular list of 4 players in a round table and the shuffled 52 cards are distributed to each of them. Print the card received by each player.

Problem 4. Play a game between two players called Matching Cardsuit where two players in a circular list alternately continue drawing card from a 52 shuffle card deck and the player having a match of card suit takes it all and starts the play by drawing card from the deck. Finally, the cards remaining without a match goes to the player, who does not have any card left to draw from the deck. Store the cards received by each player in a list and print them out. The player who has highest number of cards wins. Write C++ code of the Matching Cardsuit game.

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!