KimotoNanami17.c
void initialize(Card deck[]){
  int i = 0;
   // Loop through the deck.
  for(i=0;i<MAX_CARDS;i++){
  // i % MAX_RANKS to cycle through each possible rank.
    deck[i].rank = ranks[i%MAX_RANKS];
    // i / MAX_RANKS to keep the same suit for each card in a suit.
    strncpy(deck[i].suit, suits[i/MAX_RANKS], MAX);
    deck[i].color = color[i/MAX_RANKS];//get color through array 
  }
}
/**
 * Initializes a playing card deck of 52 cards.
 * Sets the rank and suit of each card in deck[].
 * Creates all the Clubs, then Diamonds, then Hearts and finally Spades cards.
 * (Essentially in the order of suits[].)
 *
 * @param deck[] An array of cards to initialize.
 */
Initializes a playing card deck of 52 cards.
Sets the rank and suit of each card in deck[].
Creates all the Clubs, then Diamonds, then Hearts and finally Spades cards.
(Essentially in the order of suits[].)

@param deck[] An array of cards to initialize.
Initializes a playing card deck of 52 cards . Sets the rank and suit of each card in deck [] . Creates all the Clubs then Diamonds then Hearts and finally Spades cards . ( Essentially in the order of suits [] . ) @param deck [] An array of cards to initialize .
void initialize(Card deck[]){
  int i = 0;
  for(i=0;i<MAX_CARDS;i++){
    deck[i].rank = ranks[i%MAX_RANKS];
    strncpy(deck[i].suit, suits[i/MAX_RANKS], MAX);
    deck[i].color = color[i/MAX_RANKS];
  }
}
void initialize ( Card deck [ ] ) { int i = 0 ; for ( i = 0 ; i < MAX_CARDS ; i ++ ) { deck [ i ] . rank = ranks [ i % MAX_RANKS ] ; strncpy ( deck [ i ] . suit , suits [ i / MAX_RANKS ] , MAX ) ; deck [ i ] . color = color [ i / MAX_RANKS ] ; } }
Initializes a playing card deck of 52 cards.
Initializes a playing card deck of 52 cards .
// Loop through the deck. // i % MAX_RANKS to cycle through each possible rank. // i / MAX_RANKS to keep the same suit for each card in a suit. //get color through array 