Move zobrist keys out of Position

Are used by Position but do not belong to that class,
there is only one instance of them (that's why were
defined as static), so move to a proper namespace instead.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-08-20 18:09:57 +01:00
parent ec9038b7b4
commit 7c8b7222f5
4 changed files with 98 additions and 92 deletions

View File

@@ -321,9 +321,21 @@ inline Score apply_weight(Score v, Score w) {
#undef ENABLE_OPERATORS_ON
#undef ENABLE_SAFE_OPERATORS_ON
namespace Zobrist {
extern Key psq[2][8][64]; // [color][pieceType][square]/[piece count]
extern Key enpassant[8]; // [file]
extern Key castle[16]; // [castleRight]
extern Key side;
extern Key exclusion;
void init();
}
extern Score pieceSquareTable[16][64];
extern int SquareDistance[64][64];
extern const Value PieceValueMidgame[17]; // Indexed by Piece or PieceType
extern const Value PieceValueEndgame[17];
extern int SquareDistance[64][64];
struct MoveStack {
Move move;