aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-24 19:11:44 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-24 19:11:44 +0100
commit8e4a89ea7330f01b7df0040276b82006c6c8fdd7 (patch)
tree7b4c3f9363c3394a329d617788f92bfb1b040a9c /src/game_tab
parent065be164cc0dab48dfad964a859d7875f28557e7 (diff)
Debug HalfMove and pgn loader
Diffstat (limited to 'src/game_tab')
-rw-r--r--src/game_tab/HalfMove.cpp4
-rw-r--r--src/game_tab/editor/EditorCanvas.cpp2
2 files changed, 3 insertions, 3 deletions
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);