From 46a1d59c7cea90bcb73bec226ebdd036479009c2 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Mon, 4 Sep 2023 18:01:48 +0300 Subject: fix: start Iterative Deepening from depth 1 --- src/grossmeister/UCI.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/grossmeister/UCI.rs') diff --git a/src/grossmeister/UCI.rs b/src/grossmeister/UCI.rs index 50af980..6f6556c 100644 --- a/src/grossmeister/UCI.rs +++ b/src/grossmeister/UCI.rs @@ -14,14 +14,14 @@ impl Grossmeister { loop { let mut cmd = String::new(); stdin().read_line(&mut cmd).unwrap(); - let tokens = cmd.trim().split(' '); - if !self.parse_command(tokens, &mut search_handle) { + if !self.parse_command(cmd, &mut search_handle) { break } } } - pub fn parse_command(&mut self, mut tokens: Split, search_handle: &mut Option>) -> bool { + pub fn parse_command(&mut self, cmd: String, search_handle: &mut Option>) -> bool { + let mut tokens = cmd.trim().split(' '); if let Some(token) = tokens.next() { match token { "uci" => { -- cgit v1.2.3