// Display Header // Brandon Goldfedder #ifndef _DISPLAYER #define _DISPLAYER #include "bjhand.h" // The Displayer class forms the interface for all I/O in the system // Note the use of default null functions to provide NOP behavior class Displayer { public: Displayer() {} virtual ~Displayer() {} virtual void Reset(const BlackJackHand& hand) {} virtual void DrawCard(const BlackJackHand& hand, const Card& card) {} virtual void DisplayTurn(const BlackJackHand& hand, BlackJackHand::TURN_RESULT turn) {} virtual void DisplayResult(const BlackJackHand& hand, const char* result = 0) {} // Display the result - use a 0 for result to just display total virtual bool InquireInsurance(const BlackJackHand& hand) { return false;} virtual BlackJackHand::TURN_RESULT InquireTurn(const BlackJackHand& hand, bool mayDouble = false, bool maySplit = false) = 0; virtual bool InquireNewGame() { return false; } // Ask for a new game }; #endif
3.138.175.180