Skip to content

Commit 1aeaef7

Browse files
committed
pawn hash table
1 parent 7fe008d commit 1aeaef7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

hashtable.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#ifndef HASHTABLEH
3232
#define HASHTABLEH
3333
#include "claudia.h"
34+
#include "pawns.h"
3435

3536
#define HASH_EXACT 0
3637
#define HASH_BETA 1
@@ -68,4 +69,22 @@ void UpdateTable(HASHTABLE*, KEY, int, MOVE, int, int);
6869
MOVE GetHashMove(HASHTABLE*, KEY);
6970
int GetHashEval(HASHTABLE*, KEY, int, int, int);
7071

72+
typedef struct{
73+
KEY pawn_bitboard;
74+
int eval;
75+
} PawnData;
76+
77+
typedef struct PAWNTABLE{
78+
PawnData *entries;
79+
unsigned int size;
80+
unsigned int full;
81+
} PAWNTABLE;
82+
83+
extern struct PAWNTABLE pawn_table;
84+
85+
int AllocPawnTable(PAWNTABLE*, int);
86+
void DeletePawnTable(PAWNTABLE*);
87+
void ClearPawnTable(PAWNTABLE*);
88+
void UpdatePawnTable(PAWNTABLE*, BITBOARD, int);
89+
int GetPawnEval(PAWNTABLE*, BITBOARD);
7190
#endif

0 commit comments

Comments
 (0)