def test_board_is_winner_true(self,size,initial_grid): board1 = Board(size); board1.grid = initial_grid self.assertTrue(board1.is_winner(RECORD_THE_WINNER))
def test_board_is_game_over_false(self,size,initial_grid): board1 = Board(size); board1.grid = initial_grid self.assertFalse(board1.is_game_over())
def test_board_possible_win_returns_correct_number(self, size, initial_grid, symbol, expected): board1 = Board(size); board1.grid = initial_grid countpossiblewins = board1.count_possible_winning_lines(symbol) self.assertEqual(countpossiblewins,expected)
def test_board_grid_update_move_not_allowed(self,size,initial_grid, move): board1 = Board(size); board1.grid = initial_grid self.assertFalse(board1.update_move(move,"X"))
def test_board_is_winner_winningline_is_corect(self,size,initial_grid,winner): board1 = Board(size); board1.grid = initial_grid board1.is_winner(RECORD_THE_WINNER) self.assertEqual(board1.winner,winner)