Base class for controlers. More...
#include <Controlers/Controler.hpp>
Public Member Functions | |
Controler () | |
Default constructor Will define an invalid color making this controller basically invalid. | |
virtual Move< Coords > | getMove ()=0 |
Gets the move that the controler wants to play This function is generally waiting for the move from the controler. | |
virtual void | setColorControled (int color) |
Defines the color used by the controler. | |
Protected Attributes | |
int | m_colorControlled |
Base class for controlers.
A controler is the input module to interact with the game. The controller should return next move (getMove()
) of the game. This move is generally generated from user inputs or external inputs. Since a controler is like a game player, the controler has an associated color defined by setColorControled().
virtual Move<Coords> Controler< GameBoard >::getMove | ( | ) | [pure virtual] |
Gets the move that the controler wants to play This function is generally waiting for the move from the controler.
Implemented in KeyboardControler, QtControler, and QtGNUChessControler.
virtual void Controler< GameBoard >::setColorControled | ( | int | color | ) | [inline, virtual] |
Defines the color used by the controler.
color |
Reimplemented in QtControler, and QtGNUChessControler.
int Controler< GameBoard >::m_colorControlled [protected] |
Color associated to this controler