Java Reference
In-Depth Information
Additional programming exercises are available in WileyPLUS.
PROGRAMMING PROJECTS
΢΢΢Project 7.1. Poker Simulator. In this assignment, you will implement a
simulation of a popular casino game usually called video poker. The card
deck contains 52 cards, 13 of each suit. At the beginning of the game, the
deck is shuffled. You need to devise a fair method for shuffling. (It does
not have to be efficient.) Then the top five cards of the deck are
presented to the player. The player can reject none, some, or all of the
cards. The rejected cards are replaced from the top of the deck. Now the
hand is scored. Your program should pronounce it to be one of the
following:
ȗ No pairȌThe lowest hand, containing five separate cards that do
not match up to create any of the hands below.
ȗ One pairȌTwo cards of the same value, for example two queens.
ȗ Two pairsȌTwo pairs, for example two queens and two 5Ȑs.
ȗ Three of a kindȌThree cards of the same value, for example three
queens.
ȗ StraightȌFive cards with consecutive values, not necessarily of
the same suit, such as 4, 5, 6, 7, and 8. The ace can either precede
a 2 or follow a king.
ȗ FlushȌFive cards, not necessarily in order, of the same suit.
ȗ Full HouseȌThree of a kind and a pair, for example three queens
and two 5's
ȗ Four of a KindȌFour cards of the same value, such as four queens.
ȗ Straight FlushȌA straight and a flush: Five cards with
consecutive values of the same suit.
Search WWH ::




Custom Search