Skip to content

Commit 0cc4cb9

Browse files
committed
Tweak searchmoves once more
1 parent 45d7f0c commit 0cc4cb9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

chess/engine.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,9 @@ def _go(self, limit: Limit, *, root_moves: Optional[Iterable[chess.Move]] = None
12351235
builder.append("infinite")
12361236
if root_moves is not None:
12371237
builder.append("searchmoves")
1238-
builder.extend(move.uci() for move in root_moves)
1239-
if not root_moves:
1238+
if root_moves:
1239+
builder.extend(move.uci() for move in root_moves)
1240+
else:
12401241
# Work around searchmoves followed by nothing.
12411242
builder.append("0000")
12421243
self.send_line(" ".join(builder))

0 commit comments

Comments
 (0)