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

bjhand.hpp

 // Black jack hand header // Brandon Goldfedder #ifndef _BLACKJACKHAND #define _BLACKJACKHAND #include "card.h" class BlackJackHand { public: enum TURN_RESULT { BUST, STAND, HIT, DOUBLE_DOWN, SPLIT }; inline BlackJackHand(); virtual inline ~BlackJackHand(); virtual unsigned int LowCount() const; // Count the Ace as lower virtual unsigned int HighCount() const; // Count the Ace as high virtual bool IsBlackJack() const; // Is there a blackjack virtual unsigned int NumCards() const; // How many cards have been dealt virtual const Card& GetCard(unsigned int which) const; // Get a card user must ensure which <= NumCards virtual void AddCard(const Card& card); // Deal a card virtual void Reset(); // Clear the hand virtual inline bool TookInsurance() ...

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