def test_game_restart(): game = TicTacToeGame() game.place(8) game.restart() assert game.steps == 0 for key in game.board.keys(): assert game.board[key] == "-"
def test_game_diag_win(): game = TicTacToeGame() game.place(7) game.place(5) game.place(3) assert game._check_diag_win(game.board, "X") == True assert game.check_winner(game.board) == "Player" game.restart() game.place(9) game.place(5) game.place(1) assert game._check_diag_win(game.board, "X") == True assert game.check_winner(game.board) == "Player"