mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-03 10:47:39 +00:00
Update chessarbiter and improve pgn loader
This commit is contained in:
parent
f99a7b699a
commit
829525acb9
8 changed files with 29 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue