From 3bc2251b5269a38c03b12443dd7f7c09d130c19a Mon Sep 17 00:00:00 2001 From: Chris Proctor Date: Fri, 6 May 2022 16:54:40 -0400 Subject: [PATCH] Add state arguments to match signatures --- play.py | 2 +- ttt_view.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/play.py b/play.py index d01e8e0..6935515 100644 --- a/play.py +++ b/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) diff --git a/ttt_view.py b/ttt_view.py index e2ae642..344129f 100644 --- a/ttt_view.py +++ b/ttt_view.py @@ -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