blob: adf05c17ddc3747c5a153ad78f806a8a5ba7123e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#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();
};
|