Function cozy_chess::get_bishop_moves
source · pub fn get_bishop_moves(square: Square, blockers: BitBoard) -> BitBoard
Expand description
Get the moves for a bishop on some square.
See get_bishop_moves_const
for a significantly slower const
variant.
§Examples
let blockers = bitboard! {
. . . . . . . .
. . . . . . . X
. . X . . . . .
. . . . . X . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . X . .
};
let moves = get_bishop_moves(Square::D3, blockers);
assert_eq!(moves, bitboard! {
. . . . . . . .
. . . . . . . .
X . . . . . . .
. X . . . X . .
. . X . X . . .
. . . . . . . .
. . X . X . . .
. X . . . X . .
});