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