//------------------------------------------------ // CHand() // // Precondition: None. // Postcondition: Initializes all the properties. //------------------------------------------------ public CHand() { hand = new CCard[handSize]; for (int i = 0; i < hand.Length; i++) hand[i] = new CCard(0, 0); //initilize the the hand. starts of with what the enumerator has set to 0, 0. }
//------------------------------------------------ // CDeck() // // Precondition: None. // Postcondition: Initializes all the properties. //------------------------------------------------ public CDeck() { deck = new CCard[TotalSuits, SuitCount]; for (int i = 0; i < TotalSuits; i++) for (int j = 0; j < SuitCount; j++) deck[i, j] = new CCard((SuitValue)i, (CardValue)j); }
public CHand() //------------------------------------------------ // CHand() // // Precondition: None. // Postcondition: Initializes all the properties. //------------------------------------------------ { hand = new CCard[handSize]; for (int i = 0; i < hand.Length; i++) { hand[i] = new CCard(0, 0); //initilize the the hand. starts of with what the enumerator has set to 0, 0. } }
public CDeck() //------------------------------------------------ // CDeck() // // Precondition: None. // Postcondition: Initializes all the properties. //------------------------------------------------ { deck = new CCard[TotalSuits, SuitCount]; for (int i = 0; i < TotalSuits; i++) { for (int j = 0; j < SuitCount; j++) { deck[i, j] = new CCard((SuitValue)i, (CardValue)j); } } }