Don't need to expose namespace Zobrist
[stockfish] / src / position.cpp
index 05a02f158948e73513b33e62e24ef095377c3e4e..c5e029401ff34c2edfc78ef4e8dd3bf0e494cd12 100644 (file)
@@ -46,11 +46,16 @@ Value PieceValue[PHASE_NB][PIECE_NB] = {
 { VALUE_ZERO, PawnValueMg, KnightValueMg, BishopValueMg, RookValueMg, QueenValueMg },
 { VALUE_ZERO, PawnValueEg, KnightValueEg, BishopValueEg, RookValueEg, QueenValueEg } };
 
-Key Zobrist::psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB];
-Key Zobrist::enpassant[FILE_NB];
-Key Zobrist::castle[CASTLE_RIGHT_NB];
-Key Zobrist::side;
-Key Zobrist::exclusion;
+namespace Zobrist {
+
+  Key psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB];
+  Key enpassant[FILE_NB];
+  Key castle[CASTLE_RIGHT_NB];
+  Key side;
+  Key exclusion;
+}
+
+Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion;}
 
 namespace {