aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-09 18:38:19 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-09 18:38:19 +0100
commitd6ed30d276d0e2688051ed8d6fe542a331e5ac90 (patch)
tree67bb2e67103451d5bb012956196b9bd8cade04ea /src/game_tab/right_panel
parentf4108bc06cd9fa1977267836e9176118e8863b57 (diff)
Improve engine arrows
Diffstat (limited to 'src/game_tab/right_panel')
-rw-r--r--src/game_tab/right_panel/LiveEngineDialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game_tab/right_panel/LiveEngineDialog.cpp b/src/game_tab/right_panel/LiveEngineDialog.cpp
index 347c32e..0c2ecfc 100644
--- a/src/game_tab/right_panel/LiveEngineDialog.cpp
+++ b/src/game_tab/right_panel/LiveEngineDialog.cpp
@@ -105,14 +105,16 @@ void LiveEngineDialog::OnTimerTick(wxTimerEvent &event) {
lines_list->DeleteAllItems();
engine->SyncAfter(0);
EngineEvaluation *eval=new EngineEvaluation();
- for (auto const &line : engine->GetLines()) {
+ auto const &lines=engine->GetLines();
+ eval->best_lines.resize(lines.size());
+ for (auto const &line : lines) {
long index = lines_list->InsertItem(0, std::to_string(line.first));
std::string line_moves;
for (std::string move : line.second.pv) {
line_moves += move + " ";
}
if(line.second.pv.size()>0){
- eval->best_lines.push_back(line.second.pv[0]);
+ eval->best_lines.insert(eval->best_lines.begin()+line.first,line.second.pv[0]);
}
std::string cp_str = std::to_string(line.second.score_cp);
if (line.second.score_cp > 0) {