Question
Goal The purpose of this assignment is to design and implement a simple single hand video poker machine. The machine should be able to implement
Goal
The purpose of this assignment is to design and implement a
simple single hand video poker machine.
The machine should be able to implement the basic rules of
a five card draw hand
.
This program is due
March 1, 2019 at 11:59 p.m.
Instructions
This program
is
individual
work and not a group effort. If you have any
questions,
please direct them
to
me first.
Your program should
utilize the card and deck classes developed in class and provided for
download.
You are w
elcome to make minor edits to the car
d and deck classes, such as changing the
values of the
suits to
si
mplify
identifying flushes.
Your program
must
implement and use
a
hand class
capable of identifying
and rating poker hands and
support the mechanics of five card draw.
A few
specific
s to be aware of
...
1. Aces are the highest card in poker, not the lowest.
2
. Aces count as bot
h higher than king and lower than 2 for the p
urpose
s of straig
hts.
3
. The player can only discard 3 cards from his hand, unles
s the one card he is keeping is an Ace
4. You
shou
ld
resh
uffle the deck when
the card
s remaining
is
9 or less when you deal.
5
.
Poker
hands
are rated from
highest
hand to lowest ha
nd as follows:
royal
flush
str
aight flush
four of a kind
full house
flush
straight
three of a kind
two pair
one pair
high card
class Hand Data Members Name Description cards FOUROFAKIND FULLHOUSE THREEOFAKIND TWOPAIR ONEPAIR Type array of cards static const int static const int static const int static const int static const int Access private public public public public public Array that stores the cards in your hand Constant that represents a 4 of a kind Constant that represents a full house Constant that represents a 3 of a kind Constant that represents 2 pair Constant that represents one pair HIGHCARD FLUSH ROYALFLUSH STRAIGHT STRAIGHTFLUSH static const int static const int static const int static const int static const int public public public public public Constant that represents high card Constant that represents a flush Constant that represents a royal flush Constant that represents a straight Constant that represents a straight flush class Hand Methods Name Type Arguments Access Description Hand Deal draw dispayHand keepCard discardCard evaluate void void void void void int deck &d deck &d, intx ostream &os nt x int x void public public public public public public public Default constructor Deals 5 cards from Deck d Draws x cards from the Deck d Displays the user's hand of cards Sets a card as kept Sets a card as discarded Evaluates the poker hand class Hand Data Members Name Description cards FOUROFAKIND FULLHOUSE THREEOFAKIND TWOPAIR ONEPAIR Type array of cards static const int static const int static const int static const int static const int Access private public public public public public Array that stores the cards in your hand Constant that represents a 4 of a kind Constant that represents a full house Constant that represents a 3 of a kind Constant that represents 2 pair Constant that represents one pair HIGHCARD FLUSH ROYALFLUSH STRAIGHT STRAIGHTFLUSH static const int static const int static const int static const int static const int public public public public public Constant that represents high card Constant that represents a flush Constant that represents a royal flush Constant that represents a straight Constant that represents a straight flush class Hand Methods Name Type Arguments Access Description Hand Deal draw dispayHand keepCard discardCard evaluate void void void void void int deck &d deck &d, intx ostream &os nt x int x void public public public public public public public Default constructor Deals 5 cards from Deck d Draws x cards from the Deck d Displays the user's hand of cards Sets a card as kept Sets a card as discarded Evaluates the poker handStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started