We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59c7ff4 commit 135a9dfCopy full SHA for 135a9df
TicTacToe.py
@@ -28,7 +28,6 @@ def inputPlayerLetter():
28
29
def whoGoesFirst():
30
# Randomly choose the player who goes first.
31
- random.seed()
32
if random.randint(0, 1) == 0:
33
return 'computer'
34
else:
@@ -81,7 +80,6 @@ def getPlayerMove(board):
81
80
def chooseRandomMoveFromList(board, movesList):
82
# Returns a valid move from the passed list on the passed board.
83
# Returns None if there is no valid move.
84
85
possibleMoves = []
86
for i in movesList:
87
if isSpaceFree(board, i):
@@ -137,7 +135,7 @@ def isBoardFull(board):
137
135
138
136
def main():
139
print('Welcome to Tic Tac Toe!')
140
-
+ random.seed()
141
while True:
142
# Reset the board
143
theBoard = [' '] * 10
0 commit comments