Skip to content

Commit

Permalink
test adding is_move_correct check back in
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoknjas committed Aug 29, 2024
1 parent c8746a9 commit e8ee416
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stockfish/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e8ee416

Please sign in to comment.