dealer.h

 // Dealer header // Brandon Goldfedder #include <list> #include "bjhand.h" #include "deck.h" inline void destroy(BlackJackHand**) {} // Needed due to an STL issue class Dealer { public: enum STATUS {BLACKJACK, WIN, LOSE, PUSH}; // BLACKJACK becomes WIN or PUSH if dealer has bj Dealer(unsigned int numDecks, unsigned int cutCardPosition); ~Dealer(); void AssignPlayerHand(BlackJackHand* hand); void SetDealerHand(BlackJackHand* hand); void NewShoe(); void Play(); STATUS GetPlayerStatus(const BlackJackHand* hand) const; // Hand must be in set to be valid private: const unsigned int numDecks; const unsigned int cutCardPosition; bool DealCard(BlackJackHand* hand); bool ProcessTurn(BlackJackHand* hand); // returns true if player still in there ...

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.