diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 32330d06..379df012 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -7,7 +7,6 @@ int SquareDistance[SQUARE_NB][SQUARE_NB]; -Bitboard SquareBB[SQUARE_NB]; Bitboard FileBB[FILE_NB]; Bitboard RankBB[RANK_NB]; Bitboard AdjacentFilesBB[FILE_NB]; @@ -25,11 +24,6 @@ Bitboard PawnAttackSpan[COLOR_NB][SQUARE_NB]; void Bitboards::init() { - for (Square s = SQ_A1; s <= SQ_H8; ++s) - { - SquareBB[s] = 1ULL << s; - } - for (File f = FILE_A; f <= FILE_H; ++f) FileBB[f] = f > FILE_A ? FileBB[f - 1] << 1 : FileABB; diff --git a/src/bitboard.h b/src/bitboard.h index 3c436b83..c5f10217 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -51,7 +51,6 @@ extern Bitboard BishopMagics [SQUARE_NB]; extern Bitboard* BishopAttacks[SQUARE_NB]; extern unsigned BishopShifts [SQUARE_NB]; -extern Bitboard SquareBB[SQUARE_NB]; extern Bitboard FileBB[FILE_NB]; extern Bitboard RankBB[RANK_NB]; extern Bitboard AdjacentFilesBB[FILE_NB]; @@ -69,26 +68,6 @@ extern Bitboard PseudoAttacks[PIECE_TYPE_NB][SQUARE_NB]; /// Overloads of bitwise operators between a Bitboard and a Square for testing /// whether a given bit is set in a bitboard, and for setting and clearing bits. -inline Bitboard operator&(Bitboard b, Square s) { - return b & SquareBB[s]; -} - -inline Bitboard operator|(Bitboard b, Square s) { - return b | SquareBB[s]; -} - -inline Bitboard operator^(Bitboard b, Square s) { - return b ^ SquareBB[s]; -} - -inline Bitboard& operator|=(Bitboard& b, Square s) { - return b |= SquareBB[s]; -} - -inline Bitboard& operator^=(Bitboard& b, Square s) { - return b ^= SquareBB[s]; -} - inline bool more_than_one(Bitboard b) { return b & (b - 1); }