Update chessarbiter and improve pgn loader

This commit is contained in:
Loic Guegan 2022-02-24 16:45:28 +01:00
parent f99a7b699a
commit 829525acb9
8 changed files with 29 additions and 10 deletions

View file

@ -118,7 +118,10 @@ HalfMove *HalfMove::GetMainline() { return (mainline); }
HalfMove::HalfMove(pgnp::HalfMove *m, std::string initial_fen): capture(' ') {
chessarbiter::ChessArbiter arbiter;
arbiter.Setup(initial_fen);
arbiter.Play(arbiter.ParseSAN(m->move));
bool work=arbiter.Play(arbiter.ParseSAN(m->move));
if(!work){
wxLogDebug("Bug! %s",m->move);
}
char capture=arbiter.GetCapture();
if(capture != ' '){
this->capture=capture;