Generic history. More...
#include <Game/History.hpp>
Public Member Functions | |
void | add (const DataType &data) |
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.
void History< DataType >::add | ( | const DataType & | data | ) |
Adds data
data | to add in history |