Commit 37155903 authored by Loic Guegan's avatar Loic Guegan
Browse files

Display move just for testing

parent 584a7746
Pipeline #217903559 passed with stage
in 8 minutes and 23 seconds
......@@ -75,12 +75,18 @@ bool Game::Move(Coord src, Coord dst) {
bool Game::Move(ochess::model::Move *m){
if(m->isLongCastle || m->isShortCastle){
std::cout << "Castle" << std::endl;
return(Castle(m->isLongCastle));
bool ret=Castle(m->isLongCastle);
H.GetCurrentState()->SANMove=m->SANMove;
H.GetCurrentState()->editorMove.move=m->SANMove;
return(ret);
}
std::cout << " dst: " << m->dst << " ispawn: " << m->isPawn << " piece: " << m->piece<< std::endl <<std::flush;
Coord src=A.FindSrc(m->dst, m->col,m->isPawn,m->piece);
bool ret=this->Move(src.GetXY(), m->dst);
H.GetCurrentState()->SANMove=m->SANMove;
H.GetCurrentState()->editorMove.move=m->SANMove;
return(this->Move(src.GetXY(), m->dst));
return(ret);
}
void Game::Next() {
......
......@@ -101,6 +101,9 @@ public:
Move* GetInitialState(){
return(&(this->InitialState));
}
Move* GetCurrentState(){
return(this->CurrentState);
}
};
} // namespace model
......
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