X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=hash.h;h=c4420e1691f8c0a8029fa969f35c7b8e25135879;hp=0986d1394ea7d98135d4a8bfb83c6aaf4a2a1d1e;hb=HEAD;hpb=64f72f31685ea1dff12b19b22cfaf7a53ccc079f diff --git a/hash.h b/hash.h index 0986d13..c4420e1 100644 --- a/hash.h +++ b/hash.h @@ -1,35 +1,39 @@ - -// hash.h - -#ifndef HASH_H -#define HASH_H - -// includes - -#include "board.h" -#include "util.h" - -// constants - -const int RandomPiece = 0; // 12 * 64 -const int RandomCastle = 768; // 4 -const int RandomEnPassant = 772; // 8 -const int RandomTurn = 780; // 1 - -// functions - -extern void hash_init (); - -extern uint64 hash_key (const board_t * board); - -extern uint64 hash_piece_key (int piece, int square); -extern uint64 hash_castle_key (int flags); -extern uint64 hash_ep_key (int square); -extern uint64 hash_turn_key (int colour); - -extern uint64 hash_random_64 (int index); - -#endif // !defined HASH_H - -// end of hash.h - + +// hash.h + +#ifndef HASH_H +#define HASH_H + +// includes + +#include "board.h" +#include "util.h" + +// defines + +#define RandomPiece 0 +// 12 * 64 +#define RandomCastle 768 +// 4 +#define RandomEnPassant 772 +// 8 +#define RandomTurn 780 +// 1 + +// functions + +extern void hash_init (); + +extern uint64 hash_key (const board_t * board); + +extern uint64 hash_piece_key (int piece, int square); +extern uint64 hash_castle_key (int flags); +extern uint64 hash_ep_key (int square); +extern uint64 hash_turn_key (int colour); + +extern uint64 hash_random_64 (int index); + +#endif // !defined HASH_H + +// end of hash.h +