Question: Use C++ add the code to the image i uploade. This will deal 13 different cards to each of four players from the deck of

Use C++ add the code to the image i uploade.

This will deal 13 different cards to each of four players from the deck of 52 cards. The cards dealt to the players can be put in 4 one-dimensional arrays or one two-dimension array of 4 rows and 13 columns, one row for each player.

Cards should be dealt to each player off the top of the deck, alternating through players each draw:

Player 1 draws the top card

Player 2 draws the top card

etc etc..

Next, add a showHand function to the program to show the thirteen cards each player has been dealt. These can be shown as integers until the next step.

Use C++ add the code to the image i uploade. This will

#include io stream> #include algorithm> #include &); int main() srand(unsigned (time(0) vector int deck; unwrap (deck): "for (int i 0: i &deck) random shuffle(deck.begin0, deck.end(): void unwrap(vector int> &deck) for (int i 0: i 51: i++) deck push back (i)

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!