[position] Pass the PlacedPiece in move_set_for_piece() by reference to all the MoveGenerators
This commit is contained in:
parent
29eb56a5d7
commit
41c3a2075c
7 changed files with 16 additions and 16 deletions
|
@ -19,7 +19,7 @@ impl MoveGeneratorInternal for KingMoveGenerator {
|
|||
|
||||
fn move_set_for_piece(
|
||||
position: &Position,
|
||||
placed_piece: PlacedPiece,
|
||||
placed_piece: &PlacedPiece,
|
||||
_capture_mask: BitBoard,
|
||||
_push_mask: BitBoard,
|
||||
) -> MoveSet {
|
||||
|
@ -39,7 +39,7 @@ impl MoveGeneratorInternal for KingMoveGenerator {
|
|||
let quiet_moves = all_king_moves & safe_empty_squares;
|
||||
let capture_moves = all_king_moves & opposing_pieces_on_safe_squares;
|
||||
|
||||
let mut move_set = MoveSet::new(placed_piece)
|
||||
let mut move_set = MoveSet::new(*placed_piece)
|
||||
.quiet_moves(quiet_moves)
|
||||
.capture_moves(capture_moves);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue