Exemplo n.º 1
0
 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))   
Exemplo n.º 2
0
 def test_board_is_game_over_false(self,size,initial_grid):
     board1 = Board(size);
     board1.grid = initial_grid
     self.assertFalse(board1.is_game_over())
Exemplo n.º 3
0
 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)    
Exemplo n.º 4
0
 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"))
Exemplo n.º 5
0
 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)