Send stop inconditonnaly

This commit is contained in:
Baptiste Fouques 2023-01-31 17:41:46 +01:00
parent eb840f5b93
commit 256c56d841
1 changed files with 2 additions and 7 deletions

View File

@ -365,13 +365,8 @@ impl<Fi: Read, Fo: Write> UciEngine<Fi, Fo> {
}
}
pub fn stop(&mut self) -> Result<(), &'static str> {
match self.player[self.side_to_move().to_index()] {
Player::Human { .. } => Err("Not a machine to play for current color."),
Player::Engine { .. } => {
self.push(GuiCommand::Stop);
Ok(())
}
}
self.push(GuiCommand::Stop);
Ok(())
}
}