aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grossmeister/search.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs
index f0805cb..cd9389d 100644
--- a/src/grossmeister/search.rs
+++ b/src/grossmeister/search.rs
@@ -208,7 +208,9 @@ impl Grossmeister {
let search_result = self.negamax_search(alpha, beta, depth, &mut root_killers);
if search_result.0.abs() >= VALUE_WIN {
- return search_result
+ // TODO: do a mate search to print mate in X
+ result = Some(search_result);
+ break;
}
if self.should_halt.load(std::sync::atomic::Ordering::Relaxed) {
@@ -260,7 +262,10 @@ impl Grossmeister {
println!("bestmove {}", r.1[0]);
r
}
- None => panic!("Could not find a move in time"),
+ None => {
+ println!("info string could not find move in time");
+ panic!("Could not find a move in time");
+ }
}
}