mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 17:19:36 +00:00
Don't need to expose namespace Zobrist
It can be local to position.cpp No functional change.
This commit is contained in:
parent
a6e0f62a4f
commit
de1dc4f2de
3 changed files with 10 additions and 18 deletions
|
@ -46,11 +46,16 @@ Value PieceValue[PHASE_NB][PIECE_NB] = {
|
||||||
{ VALUE_ZERO, PawnValueMg, KnightValueMg, BishopValueMg, RookValueMg, QueenValueMg },
|
{ VALUE_ZERO, PawnValueMg, KnightValueMg, BishopValueMg, RookValueMg, QueenValueMg },
|
||||||
{ VALUE_ZERO, PawnValueEg, KnightValueEg, BishopValueEg, RookValueEg, QueenValueEg } };
|
{ VALUE_ZERO, PawnValueEg, KnightValueEg, BishopValueEg, RookValueEg, QueenValueEg } };
|
||||||
|
|
||||||
Key Zobrist::psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB];
|
namespace Zobrist {
|
||||||
Key Zobrist::enpassant[FILE_NB];
|
|
||||||
Key Zobrist::castle[CASTLE_RIGHT_NB];
|
Key psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB];
|
||||||
Key Zobrist::side;
|
Key enpassant[FILE_NB];
|
||||||
Key Zobrist::exclusion;
|
Key castle[CASTLE_RIGHT_NB];
|
||||||
|
Key side;
|
||||||
|
Key exclusion;
|
||||||
|
}
|
||||||
|
|
||||||
|
Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion;}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -346,10 +346,6 @@ inline Key Position::key() const {
|
||||||
return st->key;
|
return st->key;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Key Position::exclusion_key() const {
|
|
||||||
return st->key ^ Zobrist::exclusion;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Key Position::pawn_key() const {
|
inline Key Position::pawn_key() const {
|
||||||
return st->pawnKey;
|
return st->pawnKey;
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,15 +328,6 @@ inline Score operator/(Score s, int i) {
|
||||||
#undef ENABLE_OPERATORS_ON
|
#undef ENABLE_OPERATORS_ON
|
||||||
#undef ENABLE_SAFE_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 Value PieceValue[PHASE_NB][PIECE_NB];
|
||||||
extern int SquareDistance[SQUARE_NB][SQUARE_NB];
|
extern int SquareDistance[SQUARE_NB][SQUARE_NB];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue