From 3846e5f9f6337774ac808963d4f53a043993c59b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 16 Jan 2023 17:18:54 +0100 Subject: Update metadata and debug opening guesser --- src/game_tab/Game.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/game_tab/Game.cpp') diff --git a/src/game_tab/Game.cpp b/src/game_tab/Game.cpp index 9028223..c1aa605 100644 --- a/src/game_tab/Game.cpp +++ b/src/game_tab/Game.cpp @@ -145,21 +145,8 @@ void Game::GetOpening(std::string &name,std::string &eco){ }else { // If not, get the current move line (or first move) // and try to guess opening - auto line=m->GetLine(); // Vector of HalfMove - std::string pgn; - int count=1; - for(int i=0;imove +" "; - } - // If there is a line, try to guess the opening - if(pgn.size()>0){ - wxGetApp().GetBook().GuessOpening(pgn,name,eco); - m->SetOpening(name,eco); - } + wxGetApp().GetBook().GuessOpening(m->GetLineAsSAN(),name,eco); + m->SetOpening(name,eco); } } } -- cgit v1.2.3