Skip to content

Commit

Permalink
Make the send_ucinewgame_token param of _prepare_for_new_position
Browse files Browse the repository at this point in the history
… not optional.
  • Loading branch information
johndoknjas committed Aug 23, 2024
1 parent bcde8f3 commit 80984c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stockfish/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def reset_engine_parameters(self) -> None:
"""
self.update_engine_parameters(self._DEFAULT_STOCKFISH_PARAMS)

def _prepare_for_new_position(self, send_ucinewgame_token: bool = True) -> None:
def _prepare_for_new_position(self, send_ucinewgame_token: bool) -> None:
if send_ucinewgame_token:
self._put("ucinewgame")
self._is_ready()
Expand Down
2 changes: 1 addition & 1 deletion tests/stockfish/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ def test_get_wdl_stats(self, stockfish: Stockfish):
wdl_stats_3 = stockfish.get_wdl_stats()
assert isinstance(wdl_stats_3, list) and len(wdl_stats_3) == 3

stockfish._prepare_for_new_position()
stockfish._prepare_for_new_position(True)
wdl_stats_4 = stockfish.get_wdl_stats(get_as_tuple=True)
assert isinstance(wdl_stats_4, tuple) and len(wdl_stats_4) == 3
assert wdl_stats_3 == list(wdl_stats_4)
Expand Down

0 comments on commit 80984c2

Please sign in to comment.