diff --git a/engine/src/bitboard/attackmaps.rs b/engine/src/bitboard/attackmaps.rs index 51b150c..f581113 100644 --- a/engine/src/bitboard/attackmaps.rs +++ b/engine/src/bitboard/attackmaps.rs @@ -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 ----->