Fixed a bug in attack generation on the fly + slider attack tables init

This commit is contained in:
rektdie committed 2024-03-21 08:44:49 +01:00
1 parent 67f68c7598
commit dc887ee3c6
4 files changed
+214 -17

No files matched your search

+3 -3
View File
@@ -61,9 +61,9 @@ int Bitboard::getLS1BIndex() const {
Bitboard Bitboard::getOccupancy(int index, Bitboard attackMask) {
Bitboard occupancy;
int squareNum = attackMask.popCount();
for (int count = 0; count < squareNum; count++) {
int squareCount = attackMask.popCount();
for (int count = 0; count < squareCount; count++) {
int square = attackMask.getLS1BIndex();
attackMask.PopBit(square);