// cppHearts, Copyright 2001 Michael W. Godfrey, email: migod@uwaterloo.ca // See copyright.txt for details. #ifndef _SMARTPLAYER_H_ #define _SMARTPLAYER_H_ #include "Player.h" #include "Card.h" #include "Trick.h" // Smart players use a smart strategy for choosing the next card to play, // as we will see below. class SmartPlayer : public Player { public: // Constructor and destructor. SmartPlayer (string newName) : Player(newName) {}; virtual ~SmartPlayer (){}; // mutator defined as pure virtual (ie abstract) in Player is // implemented here. virtual void playCard (Trick *currentTrick); private: // Trivial enum type: am I looking for the max or the min card? enum MinOrMax {Min, Max}; // accessor used internally only virtual Card* findARandomCard (MinOrMax minOrMax) const; // mutator virtual Card* followSuit (Trick *currentTrick); }; #endif