controller.h 750 Bytes
Newer Older
Sam Moore's avatar
Sam Moore committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#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() {}

18
		MovementResult Setup(const char * opponentName); //Requests the AI program for the initial positioning of its pieces.
Sam Moore's avatar
Sam Moore committed
19

20
		MovementResult MakeMove(std::string & buffer); //Queries the AI program for a response to the state of Board::theBoard
Sam Moore's avatar
Sam Moore committed
21
22
23
24
25
26
27
28
29

		const Piece::Colour colour; //Colour identifying the side of the AI program.


};

#endif //CONTROLLER_H