Function cozy_chess::get_pawn_attacks
source · pub const fn get_pawn_attacks(square: Square, color: Color) -> BitBoard
Expand description
Get the pawn attacks for a pawn on some square.
§Examples
let attacks = get_pawn_attacks(Square::D3, Color::White);
assert_eq!(attacks, bitboard! {
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . X . X . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
});