Public Member Functions | Protected Attributes

Controler< GameBoard > Class Template Reference

Base class for controlers. More...

#include <Controlers/Controler.hpp>

Inheritance diagram for Controler< GameBoard >:
Listener< Move< GameBoard::Coords > >

List of all members.

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

Detailed Description

template<typename GameBoard>
class Controler< GameBoard >

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().

See also:
Move

Member Function Documentation

template<typename GameBoard>
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.

Returns:

Implemented in KeyboardControler, QtControler, and QtGNUChessControler.

template<typename GameBoard>
virtual void Controler< GameBoard >::setColorControled ( int  color  )  [inline, virtual]

Defines the color used by the controler.

Parameters:
color 

Reimplemented in QtControler, and QtGNUChessControler.


Member Data Documentation

template<typename GameBoard>
int Controler< GameBoard >::m_colorControlled [protected]

Color associated to this controler


The documentation for this class was generated from the following file:
 All Classes Functions Variables