X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=manager%2Fcontroller.h;fp=manager%2Fcontroller.h;h=0e2e5ccf99e08693005506ff128ed1d6c98c610f;hp=0000000000000000000000000000000000000000;hb=f91a915d6f64f9d35e867d26e8ddb9c1b1ab0c1e;hpb=b41b9981c516c746a075e96aeeb3d7914617c713 diff --git a/manager/controller.h b/manager/controller.h new file mode 100644 index 0000000..0e2e5cc --- /dev/null +++ b/manager/controller.h @@ -0,0 +1,29 @@ +#ifndef CONTROLLER_H +#define CONTROLLER_H + +#include "stratego.h" +#include "program.h" + +/** + * Class to control an AI program for a game of Stratego + * Inherits most features from the Program class + */ + +class Controller : public Program +{ + public: + Controller(const Piece::Colour & newColour, const char * executablePath) : Program(executablePath), colour(newColour) {} + virtual ~Controller() {} + + Board::MovementResult Setup(const char * opponentName); //Requests the AI program for the initial positioning of its pieces. + + Board::MovementResult MakeMove(std::string & buffer); //Queries the AI program for a response to the state of Board::theBoard + + const Piece::Colour colour; //Colour identifying the side of the AI program. + + +}; + +#endif //CONTROLLER_H + +