Public Member Functions

AbstractGame Class Reference

Base of all game that we can play. More...

#include <Game/AbstractGame.hpp>

Inheritance diagram for AbstractGame:
Game< GameBoard, GameRules >

List of all members.

Public Member Functions

virtual bool play ()=0
virtual bool isVictory () const =0
virtual int getVictoriousColor () const =0
virtual bool isDraw () const =0
virtual bool loadHistory (const std::string &fileName)=0
virtual bool saveHistory (const std::string &fileName)=0

Detailed Description

Base of all game that we can play.

An abstract game is nothing else than an object that you can play() with.


Member Function Documentation

virtual int AbstractGame::getVictoriousColor (  )  const [pure virtual]

Gets the color of the winning player

Returns:

Implemented in Game< GameBoard, GameRules >.

virtual bool AbstractGame::isDraw (  )  const [pure virtual]

Gets if the game finished in a draw

Returns:

Implemented in Game< GameBoard, GameRules >.

virtual bool AbstractGame::isVictory (  )  const [pure virtual]

Gets if the game finished in a victory

Returns:

Implemented in Game< GameBoard, GameRules >.

virtual bool AbstractGame::loadHistory ( const std::string &  fileName  )  [pure virtual]

Loads an history from a file named fileName

Parameters:
fileName 
Returns:
false if it was not possible to load the file

Implemented in Game< GameBoard, GameRules >.

virtual bool AbstractGame::play (  )  [pure virtual]

Plays a game

Returns:
true if the game achieved in a normal state

Implemented in Game< GameBoard, GameRules >.

virtual bool AbstractGame::saveHistory ( const std::string &  fileName  )  [pure virtual]

Saves the game history in a file fileName

Parameters:
fileName 
Returns:
false if it was not possible to save the file

Implemented in Game< GameBoard, GameRules >.


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