// StandardBlack jack hand header // Brandon Goldfedder #ifndef _STANDARDBLACKJACKHAND #define _STANDARDBLACKJACKHAND #include "bjhand.h" #include <deque> class Displayer; // Forward reference to avoid circular // references' class StandardBlackJackHand: public BlackJackHand { public: StandardBlackJackHand(Displayer* displayer); virtual ~StandardBlackJackHand(); unsigned int LowCount() const; // Count the Ace as lower unsigned int HighCount() const; // Count the Ace as high bool IsBlackJack() const; // Is there a blackjack bool IsSplitable() const; // Is there a blackjack unsigned int NumCards() const; // How many cards have been dealt const Card& GetCard(unsigned int which) const; // Get a card user must ensure which <= NumCards void AddCard(const Card& card); // Deal a card void Reset(); // Clear the hand bool IsAceShowing() const; // Test if an ace is showing as the top card inline Displayer* GetDisplayer() const; // Allow access to the underlying displayer private: unsigned int TotalCardCount(bool highCount) const; // Count one card unsigned int SingleCardCount(const Card& card, bool highCount) const; // Count all the cards in the hand Displayer* displayer; std::deque<Card> hand; }; inline Displayer* StandardBlackJackHand::GetDisplayer() const { return displayer; } #endif
3.138.138.144