added LUT BISHOP_MOVE_MASK in bitboard::attackmaps for king safety checks

This commit is contained in:
Varga Dávid Lajos
2025-11-20 20:22:08 +01:00
parent 33ca535547
commit 71ea2a05d0

View File

@@ -105,6 +105,17 @@ pub static ROOK_MOVE_MASK: Lazy<[u64; 64]> = Lazy::new(|| {
table
});
pub static BISHOP_MOVE_MASK: Lazy<[u64; 64]> = Lazy::new(|| {
let mut table = [0u64; 64];
for sq in 0..64 {
for dir in [1, 3, 5, 7] {
table[sq] |= RAY_TABLE[sq][dir];
}
}
table
});
// <----- TESTS ----->