1
0
Fork 0

Don't need to expose namespace Zobrist

It can be local to position.cpp

No functional change.
sf_4_base
Marco Costalba 2013-06-09 23:24:36 +02:00
parent a6e0f62a4f
commit de1dc4f2de
3 changed files with 10 additions and 18 deletions

View 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 {

View File

@ -346,10 +346,6 @@ inline Key Position::key() const {
return st->key;
}
inline Key Position::exclusion_key() const {
return st->key ^ Zobrist::exclusion;
}
inline Key Position::pawn_key() const {
return st->pawnKey;
}

View File

@ -328,15 +328,6 @@ inline Score operator/(Score s, int i) {
#undef ENABLE_OPERATORS_ON
#undef ENABLE_SAFE_OPERATORS_ON
namespace Zobrist {
extern Key psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB];
extern Key enpassant[FILE_NB];
extern Key castle[CASTLE_RIGHT_NB];
extern Key side;
extern Key exclusion;
}
extern Value PieceValue[PHASE_NB][PIECE_NB];
extern int SquareDistance[SQUARE_NB][SQUARE_NB];