[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:
parent
77f419ad3b
commit
ea74b214da
3 changed files with 48 additions and 72 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue