Commit 70b397b8 authored by Loic Guegan's avatar Loic Guegan
Browse files

Debug history

parent 6de7c020
Pipeline #219660489 passed with stage
in 8 minutes and 54 seconds
......@@ -7,6 +7,7 @@ History::History(std::string FEN) :
SavedState(NULL) {
InitialState.FEN = FEN;
CurrentState = &InitialState;
InitialState.isWhite=false; // Very important otherwise the first move will be black
}
bool History::Next(Board<PPiece> *board, FenState *state) {
if (!CurrentState->IsLeaf()) {
......
......@@ -54,7 +54,6 @@ namespace ochess
}
void Move::expand(Move *m)
{
m->isWhite=!this->isWhite;
if(this->main==nullptr){
this->main=m;
this->editorMove.next=&(m->editorMove);
......@@ -64,6 +63,7 @@ namespace ochess
this->editorMove.variations.push_back(&m->editorMove);
}
m->parent=this;
m->isWhite=!(this->isWhite);
}
bool Move::operator==(const Move &m){
return(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment