Refactor based on clippy, move tt to search module and call iterative deepening from uci_go
This commit is contained in:
@@ -2,15 +2,7 @@ use crate::{board::game::Game, evaluation::evaluation::evaluate_position, movege
|
||||
|
||||
use super::move_ordering::score_by_mvv_lva;
|
||||
|
||||
pub fn quiescence(
|
||||
game: &mut Game,
|
||||
mut alpha: i32,
|
||||
beta: i32,
|
||||
nodes: &mut u64,
|
||||
depth: u8,
|
||||
) -> (Option<Move>, i32) {
|
||||
*nodes += 1;
|
||||
|
||||
pub fn quiescence(game: &mut Game, mut alpha: i32, beta: i32, depth: u8) -> (Option<Move>, i32) {
|
||||
if depth == 0 {
|
||||
return (None, evaluate_position(&game.board));
|
||||
}
|
||||
@@ -37,7 +29,7 @@ pub fn quiescence(
|
||||
continue;
|
||||
}
|
||||
|
||||
let move_score = -quiescence(game, -beta, -alpha, nodes, depth - 1).1;
|
||||
let move_score = -quiescence(game, -beta, -alpha, depth - 1).1;
|
||||
game.unmake_move();
|
||||
|
||||
if move_score >= beta {
|
||||
|
||||
Reference in New Issue
Block a user