Add state arguments to match signatures
This commit is contained in:
parent
463c168405
commit
3bc2251b52
2
play.py
2
play.py
|
@ -8,7 +8,7 @@ game = TTTGame(player0, player1)
|
|||
view = TTTView()
|
||||
|
||||
view.greet(game)
|
||||
while not game.is_over():
|
||||
while not game.is_over(game.state):
|
||||
action = view.get_action(game)
|
||||
game.play_action(action)
|
||||
view.conclude(game)
|
||||
|
|
|
@ -54,9 +54,9 @@ class TTTView:
|
|||
"""Says goodbye.
|
||||
"""
|
||||
self.print_board_with_options(game)
|
||||
if game.check_winner('X'):
|
||||
if game.check_winner(game.state, 'X'):
|
||||
winner = game.players['X']
|
||||
elif game.check_winner('O'):
|
||||
elif game.check_winner(game.state, 'O'):
|
||||
winner = game.players['O']
|
||||
else:
|
||||
winner = None
|
||||
|
|
Loading…
Reference in New Issue