reimplemented the GetSquare function + enabled compiler optimization

This commit is contained in:
rektdie committed 2024-05-15 00:15:37 +02:00
1 parent 986b49b503
commit f6c2b6a881
4 files changed
+12 -8

No files matched your search

+3 -3
View File
@@ -28,15 +28,15 @@ U64 Bitboard::GetBoard() const {
}
bool Bitboard::IsSet(int square) const {
return (1ULL << square) & m_board;
return GetSquare(square).GetBoard() & m_board;
}
void Bitboard::SetBit(int square) {
m_board |= (1ULL << square);
m_board |= GetSquare(square).GetBoard();
}
void Bitboard::PopBit(int square) {
m_board &= ~(1ULL << square);
m_board &= ~GetSquare(square).GetBoard();
}
int Bitboard::PopCount() const {