예제 #1
0
    def test_get_possible_numbers_for_dimension_four(self):
        expected_possible_numbers_for_max = {1, 3, 5, 7, 9, 11, 13, 15}
        expected_possible_numbers_for_min = {2, 4, 6, 8, 10, 12, 14, 16}
        game = NumericalTicTacToe(dimension=4)

        possible_numbers_for_max = game.possible_numbers(Max)
        possible_numbers_for_min = game.possible_numbers(Min)

        self.assertEqual(expected_possible_numbers_for_max,
                         possible_numbers_for_max)
        self.assertEqual(expected_possible_numbers_for_min,
                         possible_numbers_for_min)
예제 #2
0
    def test_get_possible_numbers_for_dimension_three(self):
        expected_possible_numbers_for_max = {1, 3, 5, 7, 9}
        expected_possible_numbers_for_min = {2, 4, 6, 8}
        game = NumericalTicTacToe(dimension=3)

        possible_numbers_for_max = game.possible_numbers(Max)
        possible_numbers_for_min = game.possible_numbers(Min)

        self.assertEqual(expected_possible_numbers_for_max,
                         possible_numbers_for_max)
        self.assertEqual(expected_possible_numbers_for_min,
                         possible_numbers_for_min)