deck.h
// Deck header // Brandon Goldfedder #ifndef _DECK #define _DECK #include <vector> #include "card.h" // Deck represents a group of >=0 sets of 52 cards class Deck { public: Deck(); ~Deck(); void BurnIt(); // Destroy all cards in the decks void AddDeck(unsigned int numDecks = 1); // Adds numDecks of Cards into the Deck, does not shuffle it in void Shuffle(); // Shuffle all cards currently in the deck bool GetCard(Card* card); // Draw the top card (if any) from the deck, return if this was successful (any cards left) unsigned int RemainingCards(); private: std::vector<Card> actualDeck; // We will use a deque to // store the set of cards }; #endif
Get Joy of Patterns: Using Patterns for Enterprise Development, The now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.