diff options
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index 532e9ed..7b40fab 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -133,7 +133,7 @@ impl Grossmeister { } // Could not finish in time, return what we have so far - if self.should_halt.load(std::sync::atomic::Ordering::Relaxed) { + if self.should_halt.load(std::sync::atomic::Ordering::SeqCst) { break; } } @@ -227,11 +227,8 @@ impl Grossmeister { break; } - if self.should_halt.load(std::sync::atomic::Ordering::Relaxed) { - if self.debug { - println!("info string aborting"); - } - self.should_halt.store(false, std::sync::atomic::Ordering::Relaxed); + if self.should_halt.load(std::sync::atomic::Ordering::SeqCst) { + println!("info string halting search"); break; } @@ -273,7 +270,11 @@ impl Grossmeister { match result { Some(r) => { - println!("bestmove {}", r.1[0]); + print!("bestmove {}", r.1[0]); + if r.1.len() > 1 { + print!(" ponder {}", r.1[1]) + } + println!(); r } None => { |