Rename movegen module files and make readability improvements

This commit is contained in:
stefiosif
2024-09-15 11:25:22 +03:00
parent 062a2fe903
commit 6badbcd776
12 changed files with 57 additions and 51 deletions

View File

@@ -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));