aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grossmeister/UCI.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/grossmeister/UCI.rs b/src/grossmeister/UCI.rs
index 2c466a1..7d23e2d 100644
--- a/src/grossmeister/UCI.rs
+++ b/src/grossmeister/UCI.rs
@@ -41,7 +41,7 @@ impl Grossmeister {
todo!()
}
"ucinewgame" => {
- // TODO: clear transposition table
+ *self = Self::default()
}
"position" => {
if let Some(token) = tokens.next() {
@@ -126,7 +126,7 @@ impl Grossmeister {
"binc" => {
if let Some(time) = tokens.next() {
let time: u64 = time.parse().unwrap();
- self.board.clock.increment[Color::White as usize] = Duration::from_millis(time);
+ self.board.clock.increment[Color::Black as usize] = Duration::from_millis(time);
}
}
"movestogo" => {}
@@ -156,7 +156,7 @@ impl Grossmeister {
}
let color = self.board.color();
- let duration = self.board.clock.time[color as usize] / 20 + self.board.clock.increment[color as usize];
+ let duration = (self.board.clock.time[color as usize] + self.board.clock.increment[color as usize]) / 20;
self.create_terminator_thread(duration);
self.create_search_thread(u8::MAX)