subject

In this assignment we will work on the creation of a poker game. At a minimum your game must deal 2 hands of cards, and print out what poker hand each has. It must also determine which hand has won the
game - but breaking a tie will be for bonus points. For example, if both hands have 3 of a kind, that can be
considered a tie. If you want the bonus points write some code that determines which 3 of a kind is higher.
Here is the output from dealing a hand of cards:
Ace of Hearts
Ten of Clubs
Ace of Clubs
Eight of Hearts
Seven of Diamonds
2210
<>
0000011010002
You have a PAIR!
Use lots of small functions to help reduce the complexity of the code.
You must use the code from the video to get started, and you must use the following representation for a
poker hand:
make 2 arrays: suits in Hand[4], and facesin Hand[14].
suitsin Hand is 4 counters that represents how many hearts, clubs, diamonds, spades are in the hand. These
4 counters must add up to 5 for a hand of 5 cards. For example if you have 5 hearts in the hand of cards,
the array would have the values 5,0,0,0
facesin Hand is 13 counters, that represent how many two's three's, etc. you have in the hand. This must
also total 5. For example, if you have a pair of 3's, and three Kings's, this array would have the values
0,2,0,0,0,0,0,0,0,0,0,0
While dealing a hand of cards, keep a count of the suits in Hand, and faces in Hand.
I will include some code below that will help you to figure out what poker hand you have dealt.
This function will use the 2 arrays described above to determine if the hand has a flush, straight etc. have
not included the parameters. You will need to pass in the hand of cards and have the function pass back if
there is a flush, straight three of a kind, etc.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:10, passions3534ovf6dt
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
image
Computers and Technology, 23.06.2019 20:30, maryanapritchak1829
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
image
Computers and Technology, 24.06.2019 14:00, Abrahamolve
When creating a field in a table, you must set the to determine what type of data the field can store. field property data type field type data property
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, livagrace
Emma is using an artificial intelligence system, which contains information on botany, to identify a type of plant from an image. what type of ai is emma using?
Answers: 1
You know the right answer?
In this assignment we will work on the creation of a poker game. At a minimum your game must deal 2...

Questions in other subjects: