Public Member Functions

History< DataType > Class Template Reference

Generic history. More...

#include <Game/History.hpp>

List of all members.

Public Member Functions

void add (const DataType &data)

Detailed Description

template<typename DataType>
class History< DataType >

Generic history.

Specific history for chess game moves.

An history is simply a bank of data. The function add() injects a new data in the history

> History.hpp Game/History.hpp This history will keep moves by pair. Since the history can be considered as a table each line will contain the move for white player and the move for black player. TurnData is a shortcut to represents this pair. You can get a pair using get(size_t i), or a precise move for one of the player using get(size_t i, int color). The index passed to these functions should be in the range [0 - size()].

A move is not directly pushed in the history. This one has to be completed (after two effective call of add()) to see the move added to the history.

See also:
Move

Member Function Documentation

template<typename DataType>
void History< DataType >::add ( const DataType &  data  ) 

Adds data

Parameters:
data to add in history

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