Skip to content

Commit 36ef76d

Browse files
author
Christian Bender
committed
simple change in function chooseRandomMoveFromList(...)
1 parent 3e548fd commit 36ef76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TicTacToe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def chooseRandomMoveFromList(board, movesList):
8787
if isSpaceFree(board, i):
8888
possibleMoves.append(i)
8989

90-
if len(possibleMoves) != 0:
90+
if len(possibleMoves) > 0:
9191
return random.choice(possibleMoves)
9292
else:
9393
return None

0 commit comments

Comments
 (0)