aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/GameTabLeftPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/left_panel/GameTabLeftPanel.cpp')
-rw-r--r--src/game_tab/left_panel/GameTabLeftPanel.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp
index fa97f6f..4aaddb4 100644
--- a/src/game_tab/left_panel/GameTabLeftPanel.cpp
+++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp
@@ -72,34 +72,32 @@ void GameTabLeftPanel::OnPlay(wxCommandEvent &event) {
}
void GameTabLeftPanel::Notify(bool skip_animation) {
- wxLogDebug("Called!");
// Update fen and captures
std::string fen = game->GetFen();
std::map<char, std::uint8_t> captures;
bool animate=false;
HalfMove *m = game->GetCurrentMove();
std::string src,dst;
-
// Update capture and check if we should to animations during moves change:
if (m){
captures = m->GetLineCaptures();
if(m->HasParent(last_move)){
- UNPACK_ABSOLUTE_MOVE(m->GetAbsoluteMove(),src,dst);
+ m->GetAbsoluteMove(src,dst);
animate=true;
}else if(m->HasChild(last_move)){
// Accessing last_move here is safe since it is still
// in the tree of moves (since HasChild found it so not deleted)
- UNPACK_ABSOLUTE_MOVE(last_move->GetAbsoluteMove(),dst,src);
+ last_move->GetAbsoluteMove(dst,src);
animate=true;
}
} else if(game->GetNextMove()){ // First move animation
HalfMove *next=game->GetNextMove();
if(next==last_move){
- UNPACK_ABSOLUTE_MOVE(game->GetNextMove()->GetAbsoluteMove(),dst,src);
+ game->GetNextMove()->GetAbsoluteMove(dst,src);
animate=true;
}
}
-
+
// Update board canvas:
if(skip_animation || !animate){
board_canvas->SetupBoard(chessarbiter::FENParser::Parse(fen).board,