diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-09-03 06:26:32 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-09-03 06:26:32 +0300 |
commit | 81b0addcc9d5ff2b428981ca88ee0acdec4db2a9 (patch) | |
tree | 86d2778f6c9ce7cd9f0821cb77de7532aea132c3 | |
parent | 3c2ded0c780e095f4a9539f010731fc0309e321f (diff) | |
download | chessnost-81b0addcc9d5ff2b428981ca88ee0acdec4db2a9.tar.gz |
fix: also break if we overjumped mating depth
-rw-r--r-- | src/grossmeister/search.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index 1aa73a0..fb7e385 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -292,8 +292,8 @@ impl Grossmeister { } println!(); - // If our is mate in N, we break at depth N - if SCORE_MATE - search_result.0.abs() == depth as f32 { + // If our score is mate in N, we break at depth N + if depth as f32 >= SCORE_MATE - search_result.0.abs() { result = Some(search_result); break; } |