OChess v0.0.2
Programmer's Manual
Openings.hpp
1#pragma once
2
3#include "binres/openings.hpp"
4#include "pgnp.hpp"
5
10class Openings {
12 typedef std::vector<std::tuple<std::string,std::string,std::string>> Volume;
13
14 Volume A,B,C,D,E;
22 void SearchOpening(const pgnp::HalfMove *moves,std::string &name, std::string &eco);
29 void LoadVolume(const std::string &tsv, Volume *vol);
30public:
38 void GuessOpening(const std::string &SANMoves, std::string &name, std::string &eco);
46 void GuessOpening(const pgnp::HalfMove *moves, std::string &name, std::string &eco);
47 Openings();
48};
Guess the opening using the Lichess Opening Database See: https://github.com/lichess-org/chess-openin...
Definition: Openings.hpp:10
void LoadVolume(const std::string &tsv, Volume *vol)
Load a volume using tsv data (see openings.hpp)
Definition: Openings.cpp:86
void GuessOpening(const std::string &SANMoves, std::string &name, std::string &eco)
Guess the opening based on a list of SAN moves (PGN)
Definition: Openings.cpp:75
std::vector< std::tuple< std::string, std::string, std::string > > Volume
Loaded tsv data format as a vector of tuples (<eco>,<name>,<pgn-moves-list>)
Definition: Openings.hpp:12
void SearchOpening(const pgnp::HalfMove *moves, std::string &name, std::string &eco)
Search opening name an ECO code based on the given moves.
Definition: Openings.cpp:39