8 * Class to control a player for Stratego
15 Controller(const Piece::Colour & newColour, const char * newName = "no-name") : colour(newColour), name(newName) {}
16 virtual ~Controller() {}
18 MovementResult Setup(const char * opponentName);
20 MovementResult MakeMove(std::string & buffer);
22 virtual bool HumanController() const {return false;} //Hacky... overrides in human_controller... avoids having to use run time type info
24 bool Message(const std::string & buffer) {return Message(buffer.c_str());}
25 virtual bool Message(const char * string) = 0;
27 virtual MovementResult QuerySetup(const char * opponentName, std::string setup[]) = 0;
28 virtual MovementResult QueryMove(std::string & buffer) = 0;
29 virtual bool Valid() const {return true;}
32 virtual void Pause() {} // Hack function (AI_Controller ONLY will overwrite with wrapper to Program::Pause)
33 virtual void Continue() {} // Hack function (AI_Controller '' '' wrapper to Program::Continue)
35 const Piece::Colour colour;
37 virtual void FixName(); //Should be called after setup, sets the name of the controller