Pass Mailbox instead of Game on related functions for clarity

This commit is contained in:
stefiosif
2024-09-21 15:42:41 +03:00
parent 1ed4a0c2f9
commit a96d3d27b1
6 changed files with 25 additions and 21 deletions

View File

@@ -30,7 +30,7 @@ pub fn quiescence(game: &mut Game, mut alpha: i32, beta: i32) -> (Option<Move>,
})
.collect();
captures.sort_unstable_by_key(|mv| score_by_mvv_lva(&game, *mv));
captures.sort_unstable_by_key(|mv| score_by_mvv_lva(&game.mailbox, *mv));
for mv in captures {
game.make_move(&mv);