From 256c56d84189f304a49b638c2dd9aac87ed9c075 Mon Sep 17 00:00:00 2001 From: Baptiste Fouques Date: Tue, 31 Jan 2023 17:41:46 +0100 Subject: [PATCH] Send stop inconditonnaly --- chess_uci/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/chess_uci/src/lib.rs b/chess_uci/src/lib.rs index d9dfb62..8e09d35 100644 --- a/chess_uci/src/lib.rs +++ b/chess_uci/src/lib.rs @@ -365,13 +365,8 @@ impl UciEngine { } } 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(()) } }