USE C++ OR JAVA --- POST SOURCE CODE WILL UPVOTE FOR CORRECT ANSWER ONLY --------------------------------------------------------------------------------------------------- Create a simple program that plays poker 1000 times with the following rules: Each time the program will: Shuffle the 52-card deck and deal yourself 5 cards. Using the remaining 47 cards, deal other 5 players their 5 cards. Determine if your hand would win or lose compared to the others. (Poker hands ranking listed below for reference) Your program will produce 2 output files (1000 entries): A session log output as a CSV (comma-separated value) file, with each hand (you and 5 other hands) on a separate line. For each hand: Output the cards in the hand; what the hand was evaluated as; and its winning percentage. A summary showing the percentage of hands falling into each rank, and the overall win percentage for each rank, as a ‘normal’ text file. --------------------------------------------------------------------------------------------------- The system random-number generator (random() and related functions) for the most common development environments will be more than adequate for this project.
USE C++ OR JAVA --- POST SOURCE CODE
WILL UPVOTE FOR CORRECT ANSWER ONLY
---------------------------------------------------------------------------------------------------
Create a simple program that plays poker 1000 times with the following rules:
Each time the program will:
- Shuffle the 52-card deck and deal yourself 5 cards.
- Using the remaining 47 cards, deal other 5 players their 5 cards.
- Determine if your hand would win or lose compared to the others. (Poker hands ranking listed below for reference)
- Your program will produce 2 output files (1000 entries):
- A session log output as a CSV (comma-separated value) file, with each hand (you and 5 other hands) on a separate line. For each hand: Output the cards in the hand; what the hand was evaluated as; and its winning percentage.
- A summary showing the percentage of hands falling into each rank, and the overall win percentage for each rank, as a ‘normal’ text file.
---------------------------------------------------------------------------------------------------
The system random-number generator (random() and related functions) for the most common development environments will be more than adequate for this project.
Picture reference for card rankings:
The question involves making an an entire game which is beyond the scope of answer, we thus answer with a poker game code instead and the game method can be called 1000 times and be saved in a csv.
Step by step
Solved in 5 steps