Function inanis::state::movescan::scan_pawn_moves
source · pub fn scan_pawn_moves<const CAPTURES: bool>(
board: &Board,
moves: &mut Moves,
index: usize,
evasion_mask: u64
) -> usize
Expand description
Generates all possible non-captures (if CAPTURES
is false) or all possible captures (if CAPTURES
is true) for the pawns at
the position specified by board
, stores them into moves
list (starting from index
) and returns index of the first free slot.
Use evasion_mask
with value different than u64::MAX
to restrict generator to the specified squares (useful during checks).