Cinnamon  1.1
chess engine
OpenBook.h
Go to the documentation of this file.
00001 #ifndef OPENBOOK_H
00002 #define OPENBOOK_H
00003 #include <fstream>
00004 #include "Eval.h"
00005 
00006 class OpenBook {
00007 public:
00008     OpenBook();
00009     virtual ~OpenBook();
00010     bool load() ;
00011     string search(int side,string movesPath);
00012     bool create();
00013 private:
00014     static const int SHIFT = 35;
00015     string bookFile;
00016     string fileWhite;
00017     string fileBlack;
00018     int fileSize;
00019     GenMoves* gen;
00020     char* book;
00021     string miniBook;
00022     bool useMmap;
00023     void create(string fileIn,ofstream& logFile);
00024     int sizeBook[2];
00025     int* random[2];
00026     bool san2coord(string san, int *from, int *to, int side);
00027     int getAttackers(int piece,int side,int rank,int file,int to);
00028     void printError();
00029 };
00030 #endif
00031 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines