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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
5. illustrate how fine-line inventory classification can be used with product and market segments. what are the benefits and considerations when classifying inventory by product, market, and product/market?
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 10:20
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
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
question
Mathematics, 04.08.2019 07:00
question
Mathematics, 04.08.2019 07:00
Questions on the website: 13722363