X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbook.h;fp=src%2Fbook.h;h=fcbce65b16f55f12802e0d273fe5277078e99a6e;hp=9497b9b9b4562ae08b8d752fd9959e5b6c417494;hb=9ce74698463d0b3320892b060f0fbac70415f033;hpb=4b7dbb3922a0c563d74be4474b0cbdc1b00b4595 diff --git a/src/book.h b/src/book.h index 9497b9b9..fcbce65b 100644 --- a/src/book.h +++ b/src/book.h @@ -26,26 +26,14 @@ #include "position.h" #include "rkiss.h" - -/// A Polyglot book is a series of "entries" of 16 bytes. All integers are -/// stored highest byte first (regardless of size). The entries are ordered -/// according to key. Lowest key first. -struct BookEntry { - uint64_t key; - uint16_t move; - uint16_t count; - uint32_t learn; -}; - - -class Book : private std::ifstream { +class PolyglotBook : private std::ifstream { public: - Book(); - ~Book(); + PolyglotBook(); + ~PolyglotBook(); Move probe(const Position& pos, const std::string& fName, bool pickBest); private: - template Book& operator>>(T& n); + template PolyglotBook& operator>>(T& n); bool open(const char* fName); size_t find_first(uint64_t key);