def test_check_for_win_horizontal(self): a = Game(3, 3, 3, "x") a.initialize_game() a._place_piece(2, "P") a._place_piece(1, "P") a._place_piece(0, "P") self.assertEqual(a._check_for_win("P"), True)
def test_check_for_win_left_diagonal(self): a = Game(3, 3, 3, "x") a.initialize_game() a._place_piece(0, "O") a._place_piece(1, "X") a._place_piece(1, "O") a._place_piece(2, "X") a._place_piece(2, "O") a._place_piece(1, "X") a._place_piece(2, "O") self.assertEqual(a._check_for_win("O"), True)