diff options
Diffstat (limited to 'src/game_tab/Game.cpp')
| -rw-r--r-- | src/game_tab/Game.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game_tab/Game.cpp b/src/game_tab/Game.cpp index 39605ce..49bb4d8 100644 --- a/src/game_tab/Game.cpp +++ b/src/game_tab/Game.cpp @@ -22,6 +22,17 @@ Game::Game(HalfMove *m, std::string initial_fen) : result("*") { board = chessarbiter::FENParser::Parse(initial_fen).board; } +Game::Game(const Game* g){ + board=g->board; + initial_fen=g->initial_fen; + result=g->result; + tags=g->tags; + if(g->moves != NULL){ + moves=new HalfMove(g->moves); + current=nullptr; + } +} + Game::~Game() { if (moves != NULL) { delete moves; |
