Question: Write a poker game simulation using a structure and strings to define the cards as shown below (Fig. 10.3). Then write the following functions needed

Write a poker game simulation using a structure and strings to define the cards as shown below (Fig. 10.3). Then write the following functions needed for a poker game.

Write a poker game simulation using a structure and strings to define

Also write a function that deals two five-card poker hands, evaluates each, and determines which is the better hand. Using pass by pointer technique, the function should provide the following information to main:

The two hands

Status of each hand (i.e. contains a pair or two pairs, )

Determination of which hand is the better hand

The main program should play the poker game 100 times and store the result in an array. Also the same information needs to be stored in a file.

C programming please add comments to explain your process

a. Determine whether the hand contains a pair. b. Determine whether the hand contains two pairs c. Determine whether the hand contains three of a kind (e.g., three jacks) d. Determine whether the hand contains four of a kind (e.g., four aces). e. Determine whether the hand contains a flush (i.e., all five cards of the same suit) f. Determine whether the hand contains a straight (i.e., five cards of consecutive face values)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!