mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Debug HalfMove and pgn loader
This commit is contained in:
parent
065be164cc
commit
8e4a89ea73
5 changed files with 6 additions and 6 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 975ad849d1d1474e601ad2f4bf48ea0e4405251c
|
Subproject commit 90050da015f3988ab3188eb19629aed262454fef
|
|
@ -1 +1 @@
|
||||||
Subproject commit 43434b170c2725d74f2d91f4cc86b85303893f08
|
Subproject commit bebbc7982482a2271096ef53c778cd93a4bbff7a
|
|
@ -17,7 +17,7 @@ BaseTab::BaseTab(wxFrame *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTab::OnBim(wxCommandEvent &event) {
|
void BaseTab::OnBim(wxCommandEvent &event) {
|
||||||
// LoadFile("/home/loic/hartwig.pgn");
|
LoadFile("/home/loic/hartwig.pgn");
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTab::OnOpenGame(wxListEvent &event) {
|
void BaseTab::OnOpenGame(wxListEvent &event) {
|
||||||
|
|
|
@ -135,9 +135,7 @@ HalfMove::HalfMove(pgnp::HalfMove *m, std::string initial_fen): capture(' ') {
|
||||||
this->SetMainline(new HalfMove(m->MainLine, arbiter.GetFEN()));
|
this->SetMainline(new HalfMove(m->MainLine, arbiter.GetFEN()));
|
||||||
}
|
}
|
||||||
for (pgnp::HalfMove *v : m->variations) {
|
for (pgnp::HalfMove *v : m->variations) {
|
||||||
arbiter.Setup(initial_fen);
|
this->AddVariation(new HalfMove(v, initial_fen));
|
||||||
arbiter.Play(arbiter.ParseSAN(v->move));
|
|
||||||
this->AddVariation(new HalfMove(v, arbiter.GetFEN()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,8 @@ void EditorCanvas::DrawElement(const cgeditor::Element &e) {
|
||||||
p = 'Q';
|
p = 'Q';
|
||||||
} else if (e.prop & cgeditor::Property::King) {
|
} else if (e.prop & cgeditor::Property::King) {
|
||||||
p = 'K';
|
p = 'K';
|
||||||
|
} else if (e.prop & cgeditor::Property::Rook) {
|
||||||
|
p = 'R';
|
||||||
}
|
}
|
||||||
if (e.prop & cgeditor::Property::Black) {
|
if (e.prop & cgeditor::Property::Black) {
|
||||||
p = std::tolower(p);
|
p = std::tolower(p);
|
||||||
|
|
Loading…
Add table
Reference in a new issue