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

This commit is contained in:
Varga Dávid Lajos
2025-11-20 20:21:28 +01:00
parent 08ba7ee436
commit 33ca535547

View File

@@ -94,6 +94,17 @@ pub static RAY_TABLE: Lazy<[[u64; 8]; 64]> = Lazy::new(|| {
return table;
});
pub static ROOK_MOVE_MASK: Lazy<[u64; 64]> = Lazy::new(|| {
let mut table = [0u64; 64];
for sq in 0..64 {
for dir in [0, 2, 4, 6] {
table[sq] |= RAY_TABLE[sq][dir];
}
}
table
});
// <----- TESTS ----->