Modify Fig. eight.12 within the textbook to deal a five-card poker hand. Then modify class Deckofcards of Fig. eight.11 to incorporate strategies that decide whether or not a hand incorporates:

a pair
two pair
three of a sort (e.g., three jacks)
4 of a sort (e.g., 4 aces)
a flush (i.e., all 5 playing cards of the identical go well with)
a straight (i.e., 5 playing cards of consecutive face values)
a full home (i.e., two playing cards of 1 face worth, and three playing cards of one other face worth.

Published by
Write
View all posts