[position] Implement generating pawn moves by looking up bitboards in the Library

This enables a bunch of clean up! Remove the MoveGenerationParameters and MoveList
types from move_generator::pawn.

Implement BitBoard::pawn_pushes to look up pawn pushes by square and color.
This commit is contained in:
Eryn Wells 2024-01-28 10:25:01 -08:00
parent 77f419ad3b
commit ea74b214da
3 changed files with 48 additions and 72 deletions

View file

@ -44,6 +44,10 @@ impl BitBoard {
library().pawn_attacks(sq, color)
}
pub fn pawn_pushes(sq: Square, color: Color) -> BitBoard {
library().pawn_pushes(sq, color)
}
moves_getter!(knight_moves);
moves_getter!(bishop_moves);
moves_getter!(rook_moves);