Question: PLEASE Code in Haskell! Only in Haskell! Coding the card game War There should be a dealer (the computer) and a player (the user). Both

PLEASE Code in Haskell! Only in Haskell!

Coding the card game War

There should be a dealer (the computer) and a player (the user). Both

the dealer and player will have their cards randomly dealt from the same

card shoe (a card shoe holds multiple decks of cards

Create some representation of Cards and a (card) Shoe. The Shoe should

be able to hold up to 8 decks worth of cards (416 cards total) in increments

of 52.

ou will need to implement a function that randomly shufflees the cards and

one that randomly cuts the cards. These should be called shuffles and cut respectively

Implement the \War" game according to the following speci cations:

1. The player will start with $200 to bet.

2. The player will be prompted to ask how many decks should go in the

shoe

3. The player will be prompted to place a bet before a hand is played.

4. After the player makes a bet, a hand will be played from the current

Shoe. A hand consists of the player receiving one card, then the dealer

receiving one card. The card with the higher value wins. Suits don't

matter. If there is a tie, the players go to \War".

5. If the player wins, they get their bet added to their remaining funds.

6. If the player loses, they get their bet deducted from their remaining

funds.

7. War pays out double if the player wins, but if they lose they lose

double.

8. The game continues until the player is bankrupt ($0 left to gamble) or

the cards run out

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!