[board] Update a bunch of methods to take &Piece instead of plain Piece
This commit is contained in:
parent
f7951d6110
commit
1a907844d6
8 changed files with 20 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue