card.h

 // Card header // Brandon Goldfedder #ifndef _CARD #define _CARD #include <assert.h> // Represents a standard (one of 52) poker card // Note that most operations are currently inline to ensure the speed // is the same as if it were an open abstraction class Card { public: enum SUIT {HEART, DIAMOND, CLUB, SPADE }; inline Card(); inline Card(SUIT suit, char value); inline Card(const Card& card); inline ~Card(); inline char CardType() const; // return the current card 'A' - 'K' inline SUIT Suit() const; // return the suit char SuitAsChar() const; // return the suit as 'H','D','S','C' inline bool SetSuit(SUIT newSuit); // Set the suit (returns true if successful) inline bool SetType(char newType); // Set the card type inline bool IsFaceCard() ...

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.