mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-30 17:07:45 +00:00
21 lines
710 B
C++
21 lines
710 B
C++
![]() |
#pragma once
|
||
|
|
||
|
#include "binres/openings.hpp"
|
||
|
#include "pgnp.hpp"
|
||
|
|
||
|
/**
|
||
|
* @brief Guess the opening using the Lichess Opening Database
|
||
|
* See: https://github.com/lichess-org/chess-openings
|
||
|
*/
|
||
|
class Openings {
|
||
|
typedef std::vector<std::string> MoveList;
|
||
|
typedef std::vector<std::tuple<std::string,std::string,std::string>> Volume;
|
||
|
|
||
|
Volume A,B,C,D,E;
|
||
|
void SearchOpening(const pgnp::HalfMove *moves,std::string &name, std::string &eco);
|
||
|
void LoadVolume(const std::string &tsv, Volume *vol);
|
||
|
public:
|
||
|
void GuessOpening(const std::string &SANMoves, std::string &name, std::string &eco);
|
||
|
void GuessOpening(const pgnp::HalfMove *moves, std::string &name, std::string &eco);
|
||
|
Openings();
|
||
|
};
|