Return early if king is under check and small refactorings
This commit is contained in:
@@ -5,7 +5,7 @@ use std::{
|
||||
|
||||
use crate::{
|
||||
board::game::Game,
|
||||
evaluation::evaluation::{MAX_EVAL, MIN_EVAL},
|
||||
evaluation::{MAX_SCORE, MIN_SCORE},
|
||||
movegen::r#move::Move,
|
||||
search,
|
||||
};
|
||||
@@ -139,8 +139,8 @@ pub fn uci_go(go: &mut SplitWhitespace, game: &mut Game) -> Result<Move, String>
|
||||
}
|
||||
Ok(search::negamax::negamax(
|
||||
game,
|
||||
MIN_EVAL,
|
||||
MAX_EVAL,
|
||||
MIN_SCORE,
|
||||
MAX_SCORE,
|
||||
params.depth.unwrap_or(MAX_DEPTH),
|
||||
0,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user