Page 1 of 1

At the beginning of each game, both players (the user and the AI) will receive two down cards as their personal hands. S

Posted: Sat May 14, 2022 2:54 pm
by answerhappygod
At the beginning of each game, both players (the user and the
AI) will receive two down cards as their personal hands.
Simultaneously, three board cards are given as the flop.
Note that, each player holds a personal hand (the two down
cards) and will not show it to the other player. Meanwhile, both
players are able to see the flop (the three board cards).
Please write a program that 3 1. randomly assigns the user two
cards as personal hand and print the two cards she/he receives in
the console. [5 marks]
2. randomly selects out three cards as the flop and print the
three cards in the console. [5 marks] 3. randomly assigns the AI
player two cards as its personal hand. [5 marks] 4. writes the two
personal hands and the flop in a file named “pokerhandhistory.txt”
in the same form given by the example below (“XXX” stands for the
username). [5 marks]