aboutsummaryrefslogtreecommitdiff
path: root/src/grossmeister/UCI.rs
diff options
context:
space:
mode:
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" => {