Skip to content

Commit

Permalink
Update Game.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ualvesdias authored Mar 22, 2019
1 parent 0fcb11a commit 0dd2c45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Game.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ def clear():
convertedMove = game.boardGame.convertMove(humanMove)
if not convertedMove:
print('Invalid move format. Try again!')
sleep(5)
sleep(3)
continue
if game.makeMove(convertedMove[0], convertedMove[1]):
if game.checkWin():
game.humanWins += 1
game.machine.learn(False)
clear()
print('\n%s, you have won this game! %s has learnd from its mistakes!' % (game.humanName. game.cpuName))
print('\n%s, you have won this game! %s has learned from its mistakes!' % (game.humanName, game.cpuName))
print('%s has %i victories.' % (game.humanName, game.humanWins))
print('%s has %i victories.' % (game.cpuName, game.machineWins))
sleep(5)
Expand All @@ -59,7 +59,7 @@ def clear():
game.round += 1
else:
print('Invalid move! Try again!')
sleep(5)
sleep(3)
continue
else:
machineMove = game.machine.chooseMove(game.boardGame.getBoardState(), game.round)
Expand Down

0 comments on commit 0dd2c45

Please sign in to comment.