[Board] Move DefinedBoards to BitBoard

This commit is contained in:
2022-12-22 10:34:07 +01:00
parent c66a562886
commit defd74fb63
2 changed files with 18 additions and 15 deletions

View File

@@ -44,21 +44,6 @@ private:
CastlingRights mCR = CastlingRights::None;
std::optional<Square> mEPS;
enum DefinedBoards : uint64_t {
AFile = 0x0101010101010101,
BFile = AFile << 1,
CFile = AFile << 2,
DFile = AFile << 3,
EFile = AFile << 4,
FFile = AFile << 5,
GFile = AFile << 6,
HFile = AFile << 7,
WhiteCastlingRank = (1ULL << A2) - 1,
BlackCastlingRank = (~1ULL << H7),
CastlingRanks = WhiteCastlingRank | BlackCastlingRank,
CastlingSquares = (WhiteCastlingRank | BlackCastlingRank) & (CFile | GFile),
};
void handleCastlingRights(const Piece &piece, const BitBoard &bb);
// Check if the move is castling without checking the rights or validity.
static bool isMoveCastling(const BitBoard &from, const BitBoard &to, const Piece &piece);