diff options
Diffstat (limited to 'src/Openings.hpp')
| -rw-r--r-- | src/Openings.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Openings.hpp b/src/Openings.hpp new file mode 100644 index 0000000..adf05c1 --- /dev/null +++ b/src/Openings.hpp @@ -0,0 +1,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(); +};
\ No newline at end of file |
