mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-10 08:20:23 +00:00
38 lines
903 B
C++
38 lines
903 B
C++
![]() |
#pragma once
|
||
|
|
||
|
#include "ChessArbiter.hpp"
|
||
|
#include "HalfMove.hpp"
|
||
|
#include "ochess.hpp"
|
||
|
#include <unordered_map>
|
||
|
|
||
|
class Game {
|
||
|
std::string board;
|
||
|
std::string initial_fen;
|
||
|
std::unordered_map<std::string, std::string> tags;
|
||
|
HalfMove *moves;
|
||
|
HalfMove *current;
|
||
|
chessarbiter::ChessArbiter arbiter;
|
||
|
|
||
|
public:
|
||
|
Game();
|
||
|
Game(std::string fen);
|
||
|
Game(HalfMove *m);
|
||
|
|
||
|
std::string GetBoard();
|
||
|
std::string GetTag(std::string tagname);
|
||
|
void SetTag(std::string tagname, std::string value);
|
||
|
void DeleteTag(std::string tagname);
|
||
|
HalfMove *GetCurrentMove();
|
||
|
HalfMove *GetMoves();
|
||
|
std::string GetFen();
|
||
|
bool Play(std::string move);
|
||
|
bool IsBlackToPlay();
|
||
|
void Previous();
|
||
|
void Next();
|
||
|
void DeleteMove(HalfMove *m);
|
||
|
void PromoteMove(HalfMove *m);
|
||
|
void SetMoveAsMainline(HalfMove *m);
|
||
|
void SetCurrent(HalfMove *m);
|
||
|
std::vector<std::string> ListTags();
|
||
|
std::string GetPGN();
|
||
|
};
|