diff options
Diffstat (limited to 'cardpile.h')
-rw-r--r-- | cardpile.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/cardpile.h b/cardpile.h new file mode 100644 index 0000000..eb38e83 --- /dev/null +++ b/cardpile.h @@ -0,0 +1,43 @@ +#ifndef _CARDPILE_H_ +#define _CARDPILE_H_ + +#include "card.h" +#include <iostream> +#include <string> + +using std::cout; +using std::endl; + +using std::string; + +class CardPile : public Card +{ + private: + /* draw pile */ + Card *deck[52]; + int deckCurrIndex; + + /* discard pile */ + Card *discardPile[52]; + int discardPileCurrIndex; + + protected: + + public: + CardPile(void); + ~CardPile(void); + + Card getCard(int); + void printPile(void); + + /* used by sorting algorithm to peek at the card or to assign new card */ + Card *getCardFromDeck(int); + void putCardToDeck(int, Card *); + + void putCardToDiscardPile(Card *); + Card *PopCardFromDeck(void); + void resetDeck(void); +}; + +#endif + |