O'Reilly logo

Joy of Patterns: Using Patterns for Enterprise Development, The by Brandon Goldfedder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required