Function cozy_chess::get_pawn_quiets
source · pub const fn get_pawn_quiets(
square: Square,
color: Color,
blockers: BitBoard
) -> BitBoard
Expand description
Get the pawn forward moves/non-captures for a pawn of some color on some square.
§Examples
let moves = get_pawn_quiets(Square::D2, Color::White, BitBoard::EMPTY);
assert_eq!(moves, bitboard! {
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . X . . . .
. . . X . . . .
. . . . . . . .
. . . . . . . .
});
let blockers = bitboard! {
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . X . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
};
let moves = get_pawn_quiets(Square::D7, Color::Black, blockers);
assert_eq!(moves, bitboard! {
. . . . . . . .
. . . . . . . .
. . . X . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
});