aboutsummaryrefslogtreecommitdiff
path: root/src/grossmeister/UCI.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-09-04 18:01:48 +0300
committereug-vs <eugene@eug-vs.xyz>2023-09-04 19:38:26 +0300
commit46a1d59c7cea90bcb73bec226ebdd036479009c2 (patch)
tree5e37b4ffd4143da091e6e44f46d32e50c4fb5b5a /src/grossmeister/UCI.rs
parentae858671cc21ee8516efea241f4c372fa3ccfaa6 (diff)
downloadchessnost-46a1d59c7cea90bcb73bec226ebdd036479009c2.tar.gz
fix: start Iterative Deepening from depth 1
Diffstat (limited to 'src/grossmeister/UCI.rs')
-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 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<char>, search_handle: &mut Option<JoinHandle<Self>>) -> bool {
+ pub fn parse_command(&mut self, cmd: String, search_handle: &mut Option<JoinHandle<Self>>) -> bool {
+ let mut tokens = cmd.trim().split(' ');
if let Some(token) = tokens.next() {
match token {
"uci" => {