From e8ee4166706e2322b771fc991fba3487e0aa29cd Mon Sep 17 00:00:00 2001 From: johndoknjas Date: Wed, 28 Aug 2024 17:45:23 -0700 Subject: [PATCH] test adding `is_move_correct` check back in --- stockfish/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stockfish/models.py b/stockfish/models.py index 2d0ed15..41ca6d5 100644 --- a/stockfish/models.py +++ b/stockfish/models.py @@ -360,6 +360,8 @@ def make_moves_from_current_position(self, moves: Optional[List[str]]) -> None: return self._prepare_for_new_position(False) for move in moves: + if not self.is_move_correct(move): + raise ValueError(f"Cannot make move: {move}") self._put(f"position fen {self.get_fen_position()} moves {move}") def get_board_visual(self, perspective_white: bool = True) -> str: