[−][src]Function shakmaty::attacks::bishop_mask
pub fn bishop_mask(sq: Square) -> Bitboard
Gets the set of potential blocking squares for a bishop on sq
.
Example
let mask = attacks::bishop_mask(Square::D5); // 0 . . . . . 0 . // . 1 . . . 1 . . // . . 1 . 1 . . . // . . . 0 . . . . // . . 1 . 1 . . . // . 1 . . . 1 . . // 0 . . . . . 1 . // . . . . . . . 0 assert_eq!(mask.count(), 9);