UML Class Diagram Flow of Play Your poker game\'s play() method should operate a
ID: 3541869 • Letter: U
Question
UML Class Diagram
Flow of Play
Your poker game's play() method should operate as follows:
1. Deal the player five cards and display the results on the screen
2. Ask the player which cards he or she would like to exchange
3. Remove the desired cards from the player's hand
4. Deal the player N new cards (N = exchange amount)
5. Display the new hand on the screen
6. Deal the computer five cards and display the results on the screen
7. The computer determines how many cards to exchange based on the following logic:
a. zero cards if the computer has a four of a kind, full house, straight, or flush
b. one card if the computer has two pair
c. two cards if the computer has three of a kind
d. three cards if the computer has a pair
e. five cards if the computer has none of the above
8. Remove the appropriate number of cards in the computer's hand
9. Deal the computer the appropriate number of replacement cards
10. Display the new hand on the screen
11. Determine the winner of the game based on the following rankings:
a. Four of a kind
b. Full house
c. Flush
d. Straight
e. Three of a kind
f. Two Pair
g. Pair
h. High Card (ordered by Spade, Heart, Diamond, with Club being the lowest)
12. Indicate the winner on the screen
Explanation / Answer
It is not the same....but u can try this code for a poker game and make the changes if required
dreamincode.net/forums/index.php?app=core&module=attach§ion=attach&attach_id=12121&s=553e0c932b5629171795cbe9cbe8803b
If not helpful,don't rate
thanks
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.