aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/GameTabLeftPanel.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-28 12:10:08 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-28 12:10:08 +0100
commitc451c63aaa6c898081fc658180e175e23b6f1bbb (patch)
treecda71b9a8ed2bcec6c1a4b50e3f8638798513db8 /src/game_tab/left_panel/GameTabLeftPanel.cpp
parent2151ccbe650132c8d07fba3c70c63ddc768dd38f (diff)
Prepare for pieces animation
Diffstat (limited to 'src/game_tab/left_panel/GameTabLeftPanel.cpp')
-rw-r--r--src/game_tab/left_panel/GameTabLeftPanel.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp
index 33bd265..b3b5a95 100644
--- a/src/game_tab/left_panel/GameTabLeftPanel.cpp
+++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp
@@ -58,6 +58,16 @@ void GameTabLeftPanel::OnPlay(wxCommandEvent &event) {
NotifyEditor();
}
Notify();
+
+
+ std::string fen = game->GetFen();
+ std::map<char, std::uint8_t> captures;
+ HalfMove *m = game->GetCurrentMove();
+ if (m != NULL) {
+ captures = m->GetLineCaptures();
+ }
+ /*board_canvas->Animate(chessarbiter::FENParser::Parse(fen).board,
+ game->IsBlackToPlay(), captures,"a1","a2"); */
}
void GameTabLeftPanel::Notify() {
@@ -66,9 +76,10 @@ void GameTabLeftPanel::Notify() {
HalfMove *m = game->GetCurrentMove();
if (m != NULL) {
captures = m->GetLineCaptures();
- }
+ }
board_canvas->SetupBoard(chessarbiter::FENParser::Parse(fen).board,
game->IsBlackToPlay(), captures);
+
fen_text_field->SetValue(game->GetFen());
}