mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-03 10:47:39 +00:00
Now games can be imported
This commit is contained in:
parent
e0a1894928
commit
b1a82ff568
5 changed files with 38 additions and 7 deletions
|
@ -1,13 +1,13 @@
|
|||
#include "Game.hpp"
|
||||
|
||||
Game::Game() : current(NULL), moves(NULL) {
|
||||
Game::Game() : current(NULL), moves(NULL), result("*") {
|
||||
tags["White"] = "";
|
||||
tags["Black"] = "";
|
||||
initial_fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
|
||||
board = "rnbqkbnrpppppppp PPPPPPPPRNBQKBNR";
|
||||
}
|
||||
|
||||
Game::Game(std::string fen) : current(NULL), moves(NULL) {
|
||||
Game::Game(std::string fen) : current(NULL), moves(NULL), result("*") {
|
||||
tags["White"] = "";
|
||||
tags["Black"] = "";
|
||||
tags["FEN"] = fen;
|
||||
|
@ -15,7 +15,7 @@ Game::Game(std::string fen) : current(NULL), moves(NULL) {
|
|||
board = chessarbiter::FENParser::Parse(fen).board;
|
||||
}
|
||||
|
||||
Game::Game(HalfMove *m, std::string initial_fen) {
|
||||
Game::Game(HalfMove *m, std::string initial_fen): result("*") {
|
||||
moves = m;
|
||||
current = m;
|
||||
this->initial_fen = initial_fen;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue