diff --git a/source/main.cpp b/source/main.cpp index 220fb6b..0247e3c 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -9,7 +9,5 @@ int main() { Board board; board.Init(); - Bitboard::getOccupancy(4095, maskRookAttacks(e5)).PrintBoard(); - return 0; } \ No newline at end of file diff --git a/source/movegen.h b/source/movegen.h index 9d10e02..843f3c0 100644 --- a/source/movegen.h +++ b/source/movegen.h @@ -1,6 +1,30 @@ #pragma once #include "bitboards.h" +// bishop relevant occupancy bit count +constexpr int bishopRelevantBits[64] = { + 6, 5, 5, 5, 5, 5, 5, 6, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 7, 7, 7, 7, 5, 5, + 5, 5, 7, 9, 9, 7, 5, 5, + 5, 5, 7, 9, 9, 7, 5, 5, + 5, 5, 7, 7, 7, 7, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 6, 5, 5, 5, 5, 5, 5, 6 +}; + +// rook relevant occupancy bit count +constexpr int rookRelevantBits[64] = { + 12, 11, 11, 11, 11, 11, 11, 12, + 11, 10, 10, 10, 10, 10, 10, 11, + 11, 10, 10, 10, 10, 10, 10, 11, + 11, 10, 10, 10, 10, 10, 10, 11, + 11, 10, 10, 10, 10, 10, 10, 11, + 11, 10, 10, 10, 10, 10, 10, 11, + 11, 10, 10, 10, 10, 10, 10, 11, + 12, 11, 11, 11, 11, 11, 11, 12 +}; + // pawn attacks table [side][square] extern Bitboard pawnAttacks[2][64]; extern Bitboard knightAttacks[64];