From 8e4a89ea7330f01b7df0040276b82006c6c8fdd7 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 24 Feb 2022 19:11:44 +0100 Subject: Debug HalfMove and pgn loader --- src/game_tab/HalfMove.cpp | 4 +--- src/game_tab/editor/EditorCanvas.cpp | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game_tab') diff --git a/src/game_tab/HalfMove.cpp b/src/game_tab/HalfMove.cpp index 1a6b5aa..94d9a8c 100644 --- a/src/game_tab/HalfMove.cpp +++ b/src/game_tab/HalfMove.cpp @@ -135,9 +135,7 @@ HalfMove::HalfMove(pgnp::HalfMove *m, std::string initial_fen): capture(' ') { this->SetMainline(new HalfMove(m->MainLine, arbiter.GetFEN())); } for (pgnp::HalfMove *v : m->variations) { - arbiter.Setup(initial_fen); - arbiter.Play(arbiter.ParseSAN(v->move)); - this->AddVariation(new HalfMove(v, arbiter.GetFEN())); + this->AddVariation(new HalfMove(v, initial_fen)); } } diff --git a/src/game_tab/editor/EditorCanvas.cpp b/src/game_tab/editor/EditorCanvas.cpp index 441118d..0e2f77a 100644 --- a/src/game_tab/editor/EditorCanvas.cpp +++ b/src/game_tab/editor/EditorCanvas.cpp @@ -69,6 +69,8 @@ void EditorCanvas::DrawElement(const cgeditor::Element &e) { p = 'Q'; } else if (e.prop & cgeditor::Property::King) { p = 'K'; + } else if (e.prop & cgeditor::Property::Rook) { + p = 'R'; } if (e.prop & cgeditor::Property::Black) { p = std::tolower(p); -- cgit v1.2.3