diff --git a/test_bot/test_bot.py b/test_bot/test_bot.py index 3c5e0d937..1971edae7 100644 --- a/test_bot/test_bot.py +++ b/test_bot/test_bot.py @@ -110,7 +110,7 @@ class TrivialEngine: def play(self, board: chess.Board, limit: chess.engine.Limit, ponder: bool) -> chess.engine.PlayResult: """Choose the first legal move.""" - return chess.engine.PlayResult(list(board.legal_moves)[0], None) + return chess.engine.PlayResult(next(iter(board.legal_moves)), None) def quit(self) -> None: """Do nothing."""