Skip to content

Commit

Permalink
added random seed in function whoGoesFirst()
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bender committed Mar 29, 2018
1 parent 5503bf2 commit 61159b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions TicTacToe.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def inputPlayerLetter():

def whoGoesFirst():
# Randomly choose the player who goes first.
random.seed()
if random.randint(0, 1) == 0:
return 'computer'
else:
Expand Down

0 comments on commit 61159b2

Please sign in to comment.