Constructs a new game following settings. More...
#include <GameFactory.hpp>
Static Public Member Functions | |
static int | getNbControlersNeeded (int gameType) |
static AbstractGame * | createGame (int gameType, const std::vector< int > &controlerTypes) |
Static Public Attributes | |
static const int | GT_Chess = 0 |
static const int | CT_GNUChess = 0 |
static const int | CT_Player = 1 |
Constructs a new game following settings.
The factory brings ID to recognise the game type (GT_*) et the controlers type (CT_*) From these ids, we can construct the corresponding game, which will be returned as an AbstractGame.
AbstractGame * GameFactory::createGame | ( | int | gameType, | |
const std::vector< int > & | controlerTypes | |||
) | [static] |
Create a new game
gameType | the type of the game to create | |
controlerTypes | list of controler ids to put in the game |
int GameFactory::getNbControlersNeeded | ( | int | gameType | ) | [static] |
Gets the number of controlers allowed by the game corresponding to gameType
gameType | the type of the game to check |
const int GameFactory::CT_GNUChess = 0 [static] |
ID for controler played by gnuchess
const int GameFactory::CT_Player = 1 [static] |
player input
const int GameFactory::GT_Chess = 0 [static] |
Chess game