#include "bitboard.h"
#include "position.h"
+#include "tt.h"
#include "value.h"
+
////
//// Types
////
Score kingShelters[2];
};
-/// The PawnInfoTable class represents a pawn hash table. It is basically
-/// just an array of PawnInfo objects and a few methods for accessing these
-/// objects. The most important method is get_pawn_info, which looks up a
-/// position in the table and returns a pointer to a PawnInfo object.
-class PawnInfoTable {
+/// The PawnInfoTable class represents a pawn hash table. The most important
+/// method is get_pawn_info, which returns a pointer to a PawnInfo object.
- enum SideType { KingSide, QueenSide };
+class PawnInfoTable : public SimpleHash<PawnInfo, PawnTableSize> {
- PawnInfoTable(const PawnInfoTable&);
- PawnInfoTable& operator=(const PawnInfoTable&);
+ enum SideType { KingSide, QueenSide };
public:
- PawnInfoTable();
- ~PawnInfoTable();
PawnInfo* get_pawn_info(const Position& pos) const;
void prefetch(Key key) const;
private:
template<Color Us>
Score evaluate_pawns(const Position& pos, Bitboard ourPawns, Bitboard theirPawns, PawnInfo* pi) const;
-
- PawnInfo* entries;
};