Slowhand-VI

TUT: blackjack_deck.fos

Jan 19th, 2016
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. /**<
  2.  *  Deck of cards for Blackjack.
  3.  */
  4.  
  5. #include "blackjack_card.fos"
  6.  
  7. class CDeck
  8. {
  9.     array<CCard@> cards;
  10.  
  11.     CDeck()
  12.     {
  13.         for (int cardType = CARD_TYPE_ACE; cardType <= CARD_TYPE_KING; cardType++)
  14.         {
  15.             for (int cardSuit = CARD_SUIT_SPADES; cardSuit <= CARD_SUIT_CLUBS; cardSuit++)
  16.             {
  17.                 cards.insertLast(CCard(cardType, cardSuit));
  18.             }
  19.         }
  20.     }
  21. };
Add Comment
Please, Sign In to add comment