In earlier versions of carddeck.c, we represented a deck of cards with a simple array of structures. Now that we need to shuffle the deck and keep track of other information about the deck, it makes sense to make our Deck structure a combination of an array of Card structures and an array of pointers to Card structures, as well as other information about the deck.
Consider the following definition of a new Deck structure:
typedef struct {
Cardordered[ kCardsInDeck ];
Card* shuffled[ kCardsInDeck ];
int numDealt;
boolbIsShuffled;
} Deck;
The orderedmember array will contain the initialized and orderedCardstructures. Once initialized, the orderedarray elements will not be modified. Instead of moving cards around in theorderedarray, we will use another array,shuffled, which is a collection of pointers to cards in theorderedarray. We will rely on the bIsShuffledmember variable to indicate when the deck has been shuffled...