[Solved]Game Two Decks Cards Cach 52 Cards Four Suits Ace King Player Thoroughly Shuffles Decks Pl Q37193534
Using C++
For this game there are two decks of cards cach having 52 cards in four suits from Ace to King The player thoroughly shuffles both decks and places the shuffled decks face down. One card is removed from each deck sequentially. If the two cards match the player loses. If the player gets through the whole deck without any two cards matching she wins. Write a simulation for this game to determine the odds of winning. Your simulation should play the game from 100 to 10 million times (user choice) Your user interface should a GUI form that allows the player to select the following 1. Number of shuffles for each deck 2. Type of shuffle for each deck 3. Number of shuffles. 4. Number of games in the simulation. You will also need an output window to show the number of wins, number of losses, and the odds of winning. There are several ways to do the shuffling. Here are three that you can use but feel free to make up your own. Shuffling Interlaced: Divide the deck into half. Choose two random number from 1 to 5-call these numbers n and m. Take n cards from the first half of the deck and m cards from the second half of the deck and put these together in one new deck. Repeat this until all of the cards in the original deck have been placed onto the new deck. Swap: Randomly choose two number 1 to 52. Swap the two cards at these positions. Do this say 1000 times. Piles: Divide the deck into 4 piles each of which has 13 cards. Choose a random number to 4 and create a shuffled deck by taking the top card from that pile. Repeat until all of the piles are gone Show transcribed image text For this game there are two decks of cards cach having 52 cards in four suits from Ace to King The player thoroughly shuffles both decks and places the shuffled decks face down. One card is removed from each deck sequentially. If the two cards match the player loses. If the player gets through the whole deck without any two cards matching she wins. Write a simulation for this game to determine the odds of winning. Your simulation should play the game from 100 to 10 million times (user choice) Your user interface should a GUI form that allows the player to select the following 1. Number of shuffles for each deck 2. Type of shuffle for each deck 3. Number of shuffles. 4. Number of games in the simulation. You will also need an output window to show the number of wins, number of losses, and the odds of winning. There are several ways to do the shuffling. Here are three that you can use but feel free to make up your own. Shuffling Interlaced: Divide the deck into half. Choose two random number from 1 to 5-call these numbers n and m. Take n cards from the first half of the deck and m cards from the second half of the deck and put these together in one new deck. Repeat this until all of the cards in the original deck have been placed onto the new deck. Swap: Randomly choose two number 1 to 52. Swap the two cards at these positions. Do this say 1000 times. Piles: Divide the deck into 4 piles each of which has 13 cards. Choose a random number to 4 and create a shuffled deck by taking the top card from that pile. Repeat until all of the piles are gone
Expert Answer
Answer to For this game there are two decks of cards cach having 52 cards in four suits from Ace to King The player thoroughly shu… . . .
OR

