[board] Update all the move generator submodules to use MoveBuilder instead of Move
Along the way update "manual" piece creation to use the macros instead.
This commit is contained in:
parent
ca9ff94d2a
commit
2174bcf009
7 changed files with 79 additions and 73 deletions
|
|
@ -4,7 +4,7 @@ use super::{move_generator_declaration, MoveGeneratorInternal, MoveSet};
|
|||
use crate::{
|
||||
piece::{Color, Piece, PlacedPiece},
|
||||
square::Direction,
|
||||
BitBoard, Move, Position,
|
||||
BitBoard, MoveBuilder, Position,
|
||||
};
|
||||
|
||||
move_generator_declaration!(ClassicalMoveGenerator);
|
||||
|
|
@ -53,7 +53,7 @@ impl<'pos> MoveGeneratorInternal for ClassicalMoveGenerator<'pos> {
|
|||
let quiet_moves_bb = all_moves & (empty_squares | !friendly_pieces);
|
||||
let capture_moves_bb = all_moves & opposing_pieces;
|
||||
|
||||
let map_to_move = |sq| Move::new(piece, square, sq);
|
||||
let map_to_move = |sq| MoveBuilder::new(piece, square, sq).build();
|
||||
let quiet_moves = quiet_moves_bb.occupied_squares().map(map_to_move);
|
||||
let capture_moves = capture_moves_bb.occupied_squares().map(map_to_move);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue