[board] Update a bunch of methods to take &Piece instead of plain Piece

This commit is contained in:
Eryn Wells 2024-01-21 09:18:16 -08:00
parent f7951d6110
commit 1a907844d6
8 changed files with 20 additions and 16 deletions

View file

@ -56,7 +56,7 @@ impl<'pos> MoveGeneratorInternal for KingMoveGenerator<'pos> {
// TODO: Handle checks. Prevent moving a king to a square attacked by a
// piece of the opposite color.
let map_to_move = |sq| MoveBuilder::new(piece, square, sq).build();
let map_to_move = |sq| MoveBuilder::new(*piece, square, sq).build();
let king_side_castle = Self::king_side_castle(position, color);
let queen_side_castle = Self::queen_side_castle(position, color);