Question: / / NOTE WRITE CODE IN C PROGRAMMING JUST FOR THE LAST TWO FUNCTIONS. #include #include #include #define SUITS 4 #define FACES 1 3 #define
NOTE WRITE CODE IN C PROGRAMMING JUST FOR THE LAST TWO FUNCTIONS.
#include
#include
#include
#define SUITS
#define FACES
#define CARDS
#define HANDSIZE
#define HANDSINDECK
#define NUMBEROFHANDSPLAYED Currently set to million
#define NUMBHAND
void swapunsigned int const, unsigned int const; swap the two cards pointed to by the pointers
void shuffleunsigned int wDeck; shuffle deck
intint mainvoid
define and initialize deck array
unsigned int deckCARDS;
initialize deck with values to CARDS
value caluclates suit # "Hearts", "Diamonds", "Clubs", "Spades" ;
value calculates face card Ace Jack, Queen, King
for sizet card ; card CARDS; card
deckcard card;
srandunsigned inttimeNULL; seed randomnumber generator
initialize suit array
const char suitSUITS
"Hearts", "Diamonds", "Clubs", "Spades" ;
initialize face array
const char faceFACES
"Ace", "Deuce", "Three", "Four",
"Five", "Six", "Seven", "Eight",
"Nine", "Ten", "Jack", "Queen", "King" ;
unsigned int handHANDSIZE; will contain the cards in the hand.
Define and initialize variables used to count each type of hand
unsigned int pairCount ;
unsigned int teoPairCount ;
Swap the two unsigned ints pointed to by the pointers card and card
void swapunsigned int const card unsigned int const card
Student implements this function
Shuffle cards in deck
Must invoke swap function above
void shuffleunsigned int wDeck
Student implements this function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
