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() const;
   virtual inline bool OfferInsurance();
     // Insurance or even money
   virtual TURN_RESULT TakeTurn();
     // Take a turn
   virtual inline unsigned int NumCardsDealtDown() const;
     // How many cards are dealt down
   virtual bool IsAceShowing() const;
     // Test if an ace is showing as the top card
   virtual inline const char* const GetIdentity() const;
   };


inline BlackJackHand::BlackJackHand()
{
}

inline BlackJackHand::~BlackJackHand()
{
}


inline bool BlackJackHand::TookInsurance() const
{
   return false;
}

inline bool BlackJackHand::OfferInsurance()
{
   return false;
}

inline unsigned int BlackJackHand::NumCardsDealtDown() const
{
   return 0;
}
inline const char* const BlackJackHand::GetIdentity() const
{
   return "None";
}


#endif

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.136.226