// 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 Deck theDeck; std::list<BlackJackHand*> players; BlackJackHand* dealer; // dealer will be treated special };
3.145.70.170