Rename movegen module files and make readability improvements
This commit is contained in:
@@ -18,12 +18,17 @@ pub fn quiescence(game: &mut Game, mut alpha: i32, beta: i32) -> (Option<Move>,
|
||||
alpha = stand_pat;
|
||||
}
|
||||
|
||||
let mut captures: Vec<_> = game.board.pseudo_moves_all().into_iter().filter(|m| {
|
||||
matches!(
|
||||
m.move_type,
|
||||
MoveType::Capture | MoveType::PromotionCapture(_)
|
||||
)
|
||||
}).collect();
|
||||
let mut captures: Vec<_> = game
|
||||
.board
|
||||
.pseudo_moves_all()
|
||||
.into_iter()
|
||||
.filter(|m| {
|
||||
matches!(
|
||||
m.move_type,
|
||||
MoveType::Capture | MoveType::PromotionCapture(_)
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
captures.sort_unstable_by_key(|mv| score_by_mvv_lva(&game.board, *mv));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user