Cinnamon  1.0
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     void create(string fileWhite,string fileBlack);
00013 private:
00014     static const int SHIFT=35;
00015     string bookFile;
00016     int fileSize;
00017     GenMoves* gen;
00018     char* book;
00019     string miniBook;
00020     bool useMmap;
00021     void create(string fileIn,ofstream& logFile);
00022     int sizeBook[2];
00023     int* random[2];
00024     bool san2coord(string san, int *from, int *to, int side);
00025     int getAttackers(int piece,int side,int rank,int file,int to);
00026 };
00027 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines