def __init__(self, number_of_cheeses, number_of_stools):
        """ Initialize a new ConsoleController self.

        @param ConsoleController self:
        @param int number_of_cheeses:
        @param int number_of_stools:
        @rtype: None
        """
        self.model = TOAHModel(number_of_stools)

        self.model.fill_first_stool(number_of_cheeses)

        #the complete model of the model
        self.model_complete = TOAHModel(number_of_stools)
        self.model_complete._stools[number_of_stools -
                                    1] = self.model._stools[0][0:]
    def play_loop(self):
        """ Play Console-based game.

        @param ConsoleController self:
        @rtype: None

        """
        # moves should be in the form of two int, like 0 1
        # there is a whitespace between them
        # where 0 is the index of source stool
        # and 1 is the index of destination stool
        # type 'want to exit' to exit the game

        m = TOAHModel(self.number_of_stools)
        m.fill_first_stool(self.number_of_cheeses)
        move_ = input('please enter your move')
        while move_ != 'want to exit':
            try:
                move(m, int(move_[0]), int(move_[2]))
                print(m)
                move_ = input('please enter your move')
            except IllegalMoveError as e:
                print(e)
                move_ = input('please enter your move')
            except IndexError:
                print('Invalid input!')
                move_ = input('please enter your move')
            except ValueError:
                print('invalid input!')
                move_ = input('please enter your move')
Beispiel #3
0
def tour_of_four_stools(model, delay_btw_moves=0.5, animate=False):
    """ Move a tower of cheeses from the first stool in model to the fourth.

    @type model: TOAHModel
        TOAHModel with tower of cheese on first stool and three empty
        stools
    @type delay_btw_moves: float
        time delay between moves if console_animate is True
    @type animate: bool
        animate the tour or not
    """
    mock_model = TOAHModel(model.get_number_of_stools())
    mock_model.fill_first_stool(model.get_number_of_cheeses())
    number_cheeses = model.get_number_of_cheeses()
    four_stools_move(model, number_cheeses, 0, 1, 3)
    i = 0
    move_seq = model.get_move_seq()
    move_times = move_seq.length()
    while animate:
        time.sleep(delay_btw_moves)
        ori = move_seq.get_move(i)[0]
        des = move_seq.get_move(i)[1]
        mock_model.move(ori, des)
        print(mock_model)
        i = i + 1
        if i == move_times:
            animate = False
 def setUp(self):
     self.toah = TOAHModel(4)
     self.optimals = [
         0, 1, 3, 5, 9, 13, 17, 25, 33, 41, 49, 65, 81, 97, 113, 129, 161,
         193, 225, 257, 289, 321, 385, 449, 513, 577, 641, 705, 769, 897,
         1025, 1153, 1281, 1409, 1537, 1665, 1793, 2049, 2305, 2561, 2817,
         3073, 3329, 3585, 3841, 4097, 4609, 5121, 5633
     ]
Beispiel #5
0
 def __init__(self, number_of_cheeses, number_of_stools):
     """ Initialize a new ConsoleController self.
     @param ConsoleController self:
     @param int number_of_cheeses:
     @param int number_of_stools:
     @rtype: None
     """
     self.model = TOAHModel(number_of_stools)
     self.model.fill_first_stool(number_of_cheeses)
    def __init__(self, number_of_cheeses, number_of_stools, content_width,
                 content_height, cheese_scale):
        """ Initialize a new GUIView.

        @param GUIController self:
        @param int number_of_cheeses:
            number of cheeses for first stool
        @param int number_of_stools:
            number of stools
        @param float content_width:
            width, in pixels, of working area
        @param float content_height:
            height, in pixels, of working area
        @param float cheese_scale:
            height in pixels for showing cheese thicknesses, and to
            scale cheese diameters
        """
        self._model = TOAHModel(number_of_stools)
        self._stools = []
        self._cheese_to_move = None
        self._blinking = False
        self._number_of_stools = number_of_stools
        self.cheese_scale = cheese_scale
        self.root = tk.Tk()
        canvas = tk.Canvas(self.root,
                           background="blue",
                           width=content_width,
                           height=content_height)
        canvas.pack(expand=True, fill=tk.BOTH)
        self.moves_label = tk.Label(self.root)
        self.show_number_of_moves()
        self.moves_label.pack()
        # the dimensions of a stool are the same as a cheese that's
        # one size bigger than the biggest of the number_of_cheeses cheeses.
        for stool_ind in range(number_of_stools):
            width = self.cheese_scale * (number_of_cheeses + 1)
            x_cent = content_width * (stool_ind + 1) / (number_of_stools + 1.0)
            y_cent = content_height - cheese_scale / 2
            stool = StoolView(width, lambda s: self.stool_clicked(s), canvas,
                              self.cheese_scale, x_cent, y_cent)
            self._stools.append(stool)
        # Can't use self._model.fill_first_stool because we need to
        # use CheeseView objects instead of just Cheese objects.
        total_size = self.cheese_scale
        for sizeparam in range(1, number_of_cheeses + 1):
            size = (number_of_cheeses + 1 - sizeparam)
            width = self.cheese_scale * size
            x_cent = content_width / (number_of_stools + 1.0)
            y_cent = content_height - cheese_scale / 2 - total_size

            cheese = CheeseView(size, width, lambda c: self.cheese_clicked(c),
                                canvas, self.cheese_scale, x_cent, y_cent)
            self._model.add(cheese, 0)
            total_size += self.cheese_scale
Beispiel #7
0
    def play_loop(self):
        """ Play Console-based game.

        @param ConsoleController self:
        @rtype: None

        TODO:
        -Start by giving instructions about how to enter moves (which is up to
        you). Be sure to provide some way of exiting the game, and indicate
        that in the instructions.
        -Use python's built-in function input() to read a potential move from
        the user/player. You should print an error message if the input does
        not meet the specifications given in your instruction or if it denotes
        an invalid move (e.g. moving a cheese onto a smaller cheese).
        You can print error messages from this method and/or from
        ConsoleController.move; it's up to you.
        -After each valid move, use the method TOAHModel.__str__ that we've
        provided to print a representation of the current state of the game.
        """

        is_int = False
        toah_game = TOAHModel(self.number_of_stools)
        toah_game.fill_first_stool(self.number_of_cheeses)
        print(toah_game)
        print("Welcome to the Tour of Anne Hoy Game.")
        print(
            "Enter a non-integer value such as a string(a) or a float(13.5) to quit the game."
        )
        print('')

        run = True

        while run:
            try:
                cheese_origin = int(
                    input("Choose a stool number to move the cheese from: "))
                cheese_dest = int(
                    input("Choose the stool you want to move the cheese to: "))
                toah_game.move(cheese_origin, cheese_dest)
                print(toah_game)

            except IllegalMoveError:
                print("Invalid move. Please reenter.")
                print("")

            except IndexError:
                print("Invalid stool number. Please reenter.")
                print("")

            except ValueError:
                print("")
                print("Game Ended. Thank you for playing.")
                run = False
Beispiel #8
0
    def __init__(self, number_of_cheeses, number_of_stools):
        """ Initialize a new ConsoleController self.

        @param ConsoleController self:
        @param int number_of_cheeses:
        @param int number_of_stools:
        @rtype: None
        """
        self.number_of_cheeses = number_of_cheeses
        self.number_of_stools = number_of_stools
        self.tmodel = TOAHModel(self.number_of_stools)
        self.finished = False
        self.counter = 1
Beispiel #9
0
    def __init__(self, number_of_cheeses, number_of_stools):
        """ Initialize a new ConsoleController self.

        @param ConsoleController self:
        @param int number_of_cheeses:
        @param int number_of_stools:
        @rtype: None
        """

        self._model = TOAHModel(number_of_stools)
        self._num_cheeses = number_of_cheeses
        self._num_stools = number_of_stools

        self._model.fill_first_stool(num_cheeses) #Fill 1st stool to start game
    def play_loop(self):
        """ Play Console-based game.
        @param ConsoleController self:
        @rtype: None
        TODO:
        -Start by giving instructions about how to enter moves (which is up to
        you). Be sure to provide some way of exiting the game, and indicate
        that in the instructions.
        -Use python's built-in function input() to read a potential move from
        the user/player. You should print an error message if the input does
        not meet the specifications given in your instruction or if it denotes
        an invalid move (e.g. moving a cheese onto a smaller cheese).
        You can print error messages from this method and/or from
        ConsoleController.move; it's up to you.
        -After each valid move, use the method TOAHModel.__str__ that we've
        provided to print a representation of the current state of the game.
        """
        game = TOAHModel(self.number_of_stools)
        game.fill_first_stool(self.number_of_cheeses)
        print("~~~~~~~~~~WELCOME TO FAIYAZ AND RASU'S GAME~~~~~~~~~~\n")
        print("~~~~~~~~~~OBJECTIVES~~~~~~~~~~")
        print(
            "To Move the entire stack of cheese from one stool to another stool\n"
        )
        print("~~~~~~~~~~INSTRUCTIONS~~~~~~~~~~")
        print("1. Move cheese from one stool to another one at a time \n"
              "2. Can only move the top most cheese from a stool \n"
              "3. Can't place a larger cheese over a smaller cheese \n"
              "4. To exit the game, enter 'exit'")
        print('START \n \n ')
        print(game)
        start = 'Open'
        while start != 'exit':
            origin = int(
                input(
                    "Enter the stool from which you want to move the cheese. "
                    + "Stools range from 0 to " +
                    str(self.number_of_stools - 1) + ': '))
            final = int(
                input("Now enter the stool you want to "
                      "move the slice of cheese to. Stools range from 0 to " +
                      str(self.number_of_stools - 1) + '\n'))
            try:
                move(game, origin, final)
            except IllegalMoveError as error:
                print("!!!!!!You caused an error!!!!!!!")
                print(error)

            print(game)
            start = input("type 'exit' to exit")
    def play_loop(self):
        """ Play Console-based game.

        @param ConsoleController self:
        @rtype: None

        TODO:
        -Start by giving instructions about how to enter moves (which is up to
        you). Be sure to provide some way of exiting the game, and indicate
        that in the instructions.
        -Use python's built-in function input() to read a potential move from
        the user/player. You should print an error message if the input does
        not meet the specifications given in your instruction or if it denotes
        an invalid move (e.g. moving a cheese onto a smaller cheese).
        You can print error messages from this method and/or from
        ConsoleController.move; it's up to you.
        -After each valid move, use the method TOAHModel.__str__ that we've
        provided to print a representation of the current state of the game.
        """
        print("Instruction: Player enter the start stool and destination stool"
              " at every time. \n"
              "Be ware you should enter the number of stool. "
              "i.e.'1' means first stool. Player can\n"
              "quit this game by enter 'E' when a messauge pop out.\n"
              "Be careful, "
              "You can't put big cheese over smaller ones! Good luck!\n"
              "=============================================================="
              "===================\n ")
        model = TOAHModel(self.number_of_stools)
        model.fill_first_stool(self.number_of_cheeses)
        ext = ""
        print(model)
        while ext is not "E":
            try:
                origin = int(input("Please enter the origin of movement---> "))
                dest = int(
                    input("Please enter the destination of "
                          "movement---> "))
                model.move(origin - 1, dest - 1)
            except IllegalMoveError as e:
                print(e)
            except ValueError:
                print("Please read instruction carefully,"
                      " and enter a positive integer.")
            finally:
                print(model)
                ext = input("Type E to exit game or any other to keep playing"
                            "---> ")
        print("Game over")
Beispiel #12
0
def animate_hanoi(reference_model, delay):
    """ animate the movements in the console window one by one;
     delay each movement by the given <delay>

    @type reference_model: TOAHModel
    @type delay: float
    @rtype: None
    """
    toah = TOAHModel(reference_model.get_number_of_stools())
    toah.fill_first_stool(reference_model.get_number_of_cheeses())
    for i in range(reference_model.number_of_moves()):
        movement = reference_model.get_move_seq().get_move(i)
        toah.move(movement[0], movement[1])
        time.sleep(delay)
        print(toah)
Beispiel #13
0
    def play_loop(self):
        """ Play Console-based game.

        @param ConsoleController self:
        @rtype: None

        TODO:
        -Start by giving instructions about how to enter moves (which is up to
        you). Be sure to provide some way of exiting the game, and indicate
        that in the instructions.
        -Use python's built-in function input() to read a potential move from
        the user/player. You should print an error message if the input does
        not meet the specifications given in your instruction or if it denotes
        an invalid move (e.g. moving a cheese onto a smaller cheese).
        You can print error messages from this method and/or from
        ConsoleController.move; it's up to you.
        -After each valid move, use the method TOAHModel.__str__ that we've
        provided to print a representation of the current state of the game.
        """
        show_instruction()
        won_message = False
        toah = TOAHModel(self.number_of_stools)
        model = toah.get_move_seq(). \
            generate_toah_model(self.number_of_stools, self.number_of_cheeses)
        print(model)
        movement = input("Input your move: ")
        while movement != "end":
            try:
                result = extract_input(movement)
                move(model, result[0], result[1])
            except IllegalMoveError as message:
                print(message)
            except ValueError:
                print('This is a invalid input')
            except IndexError:
                print('This is a invalid input')
            except TypeError:
                print('This is a invalid input')
            else:
                print(model)
            if len(model.get_stool()[-1]) == self.number_of_cheeses:
                movement = "end"
                won_message = True
            else:
                movement = input("Input your move: ")
        display_won_message(won_message)
Beispiel #14
0
    def __init__(self, number_of_cheeses, number_of_stools):
        """ Initialize a new ConsoleController self.

        @param ConsoleController self:
        @param int number_of_cheeses:
        @param int number_of_stools:
        @rtype: None
        """

        if isinstance(number_of_cheeses, int) and isinstance(
                number_of_stools, int):
            self.number_of_cheeses = number_of_cheeses
            self.number_of_stools = number_of_stools
            self.model = TOAHModel(self.number_of_stools)
            self.model.fill_first_stool(self.number_of_cheeses)
            self.complete = self.model._stools[0][:]

        else:
            print("Please enter a NUMBER of cheeses and a NUMBER of stools")
Beispiel #15
0
def tour_of_four_stools(model, delay_btw_moves=0.5, animate=False):
    """Move a tower of cheeses from the first stool in model to the fourth.

    @type model: TOAHModel
        TOAHModel with tower of cheese on first stool and three empty
        stools
    @type delay_btw_moves: float
        time delay between moves if console_animate is True
    @type animate: bool
        animate the tour or not
    """
    move_cheeses(model, model.get_number_of_cheeses(), 0, 1, 2, 3)
    if animate:
        new_model = TOAHModel(4)
        new_model.fill_first_stool(model.get_number_of_cheeses())
        for i in range(model.number_of_moves()):
            new_model.move(model.get_move_seq().get_move(i)[0],
                           model.get_move_seq().get_move(i)[1])
            print(new_model)
            time.sleep(delay_btw_moves)
Beispiel #16
0
    def __init__(self, number_of_cheeses, number_of_stools):
        """ Initialize a new ConsoleController self.

        @param ConsoleController self:
        @param int number_of_cheeses:
        @param int number_of_stools:
        @rtype: None
        """

        self.cheese_model = TOAHModel(number_of_stools)
        self.cheese_model.fill_first_stool(number_of_cheeses)
        self.number_of_cheese = number_of_cheeses
        self.number_of_stools = number_of_stools

        print("Welcome to the game. ")
        print("You will be asked to input the number of cheeses and "\
              "stools that you would like to play with")
        print("Make sure your inputs are a single int of how many cheeses "\
              "or stools you would like.")
        print("If you would like to stop playing, simply type 'quit'. ")
Beispiel #17
0
    def play_loop(self):
        """ Play Console-based game.

        @param ConsoleController self:
        @rtype: None

        TODO:
        -Start by giving instructions about how to enter moves (which is up to
        you). Be sure to provide some way of exiting the game, and indicate
        that in the instructions.
        -Use python's built-in function input() to read a potential move from
        the user/player. You should print an error message if the input does
        not meet the specifications given in your instruction or if it denotes
        an invalid move (e.g. moving a cheese onto a smaller cheese).
        You can print error messages from this method and/or from
        ConsoleController.move; it's up to you.
        -After each valid move, use the method TOAHModel.__str__ that we've
        provided to print a representation of the current state of the game.
        """
        m = TOAHModel(stool)
        m.fill_first_stool(cheese)
        print(m)
        cond_check = True
        while cond_check:
            move_lst = []
            user_input = input('give me instruction')
            # check condition
            check_end(user_input)
            if cond_check:
                user_input = user_input.split(',')
                try:
                    move_lst.append(int(user_input[0]))
                    move_lst.append(int(user_input[1]))
                    move(m, move_lst[0], move_lst[1])
                except Exception as a:
                    print("input should be in the format int,int ", a)
                finally:
                    print(m)
                    if len(m.get_stools_lst()[-1]) == cheese:
                        print("you win")
    def __init__(self, number_of_cheeses, number_of_stools):
        """ Initialize a new ConsoleController self.

        @param ConsoleController self:
        @param int number_of_cheeses:
        @param int number_of_stools:
        @rtype: None
        """

        self.number_of_stools = number_of_stools
        self.number_of_cheeses = number_of_cheeses

        self.toah = TOAHModel(number_of_stools)
        self.toah.fill_first_stool(number_of_cheeses)

        self.instructions = \
        ('The objective of the game is to move the given stack of cheeses \n'
         'to the right most stool with the least amount of moves.\n'
         'To move a block of cheese from stool X to stool Y \n'
         'enter stool numbers in the format x,y\n'
         "Enter 'Info' if you wish to read this message again\n"
         "Enter 'Quit' to exit the game")
Beispiel #19
0
def tour_of_four_stools(model, delay_btw_moves=0.5, animate=False):
    """Move a tower of cheeses from the first stool in model to the fourth.

    @type model: TOAHModel
        TOAHModel with tower of cheese on first stool and three empty
        stools
    @type delay_btw_moves: float
        time delay between moves if CONSOLE_ANIMATE is True
    @type animate: bool
        animate the tour or not
    """
    move_four_stools(model, model.get_number_of_cheeses(), [0, 3, 1, 2])

    if animate:
        animate_model = TOAHModel(4)
        animate_model.fill_first_stool(model.get_number_of_cheeses())
        move_seq = model.get_move_seq()
        print(animate_model)
        for i in range(move_seq.length()):
            (src_stool, dst_stool) = move_seq.get_move(i)
            time.sleep(delay_btw_moves)
            animate_model.move(src_stool, dst_stool)
            print(animate_model)
Beispiel #20
0
        print("move final " + str(m) + " took " + str(a))
        count += a
        #count += move_cheeses(model, n-m, 0, 1, 2, animate)
        #count += move_cheeses(model, m, 0, 1, 3, animate)
        #count += move_cheeses(model, n-m, 2, 0, 3, animate)
        return count


if __name__ == '__main__':
    #mod = TOAHModel(4)
    #mod.fill_first_stool(5)
    #print(tour_of_four_stools(mod,animate=True))
    #move_cheeses(mod, 8, 0, 1, 2)

    num_cheeses = 100
    delay_between_moves = 0.5
    console_animate = False

    # DO NOT MODIFY THE CODE BELOW.
    four_stools = TOAHModel(4)
    four_stools.fill_first_stool(number_of_cheeses=num_cheeses)

    tour_of_four_stools(four_stools, console_animate, delay_between_moves)

    print(four_stools.number_of_moves())
    # Leave files below to see what python_ta checks.
    # File tour_pyta.txt must be in same folder
    import python_ta

    python_ta.check_all(config="tour_pyta.txt")
Beispiel #21
0
    if animate:
        animate_model = TOAHModel(4)
        animate_model.fill_first_stool(model.get_number_of_cheeses())
        move_seq = model.get_move_seq()
        print(animate_model)
        for i in range(move_seq.length()):
            (src_stool, dst_stool) = move_seq.get_move(i)
            time.sleep(delay_btw_moves)
            animate_model.move(src_stool, dst_stool)
            print(animate_model)


if __name__ == '__main__':
    NUM_CHEESES = 5
    DELAY_BETWEEN_MOVES = 0.5
    CONSOLE_ANIMATE = True

    # DO NOT MODIFY THE CODE BELOW.
    FOUR_STOOLS = TOAHModel(4)
    FOUR_STOOLS.fill_first_stool(number_of_cheeses=NUM_CHEESES)

    tour_of_four_stools(FOUR_STOOLS,
                        animate=CONSOLE_ANIMATE,
                        delay_btw_moves=DELAY_BETWEEN_MOVES)

    print(FOUR_STOOLS.number_of_moves())
    # Leave files below to see what python_ta checks.
    # File tour_pyta.txt must be in same folder
    import python_ta
    python_ta.check_all(config="tour_pyta.txt")
 def test_all_cheeses(self):
     for i in range(0, len(self.optimals)):
         self.toah = TOAHModel(4)
         self.toah.fill_first_stool(i)
         tour.tour_of_four_stools(self.toah)
         self.assertEqual(self.toah.number_of_moves(), self.optimals[i])
    def play_loop(self):
        """ Play Console-based game.

        @param ConsoleController self:
        @rtype: None

        TODO:
        -Start by giving instructions about how to enter moves (which is up to
        you). Be sure to provide some way of exiting the game, and indicate
        that in the instructions.
        -Use python's built-in function input() to read a potential move from
        the user/player. You should print an error message if the input does
        not meet the specifications given in your instruction or if it denotes
        an invalid move (e.g. moving a cheese onto a smaller cheese).
        You can print error messages from this method and/or from
        ConsoleController.move; it's up to you.
        -After each valid move, use the method TOAHModel.__str__ that we've
        provided to print a representation of the current state of the game.
        """
        def exception_handler(origin, dest, model):
            """
            Handles the exceptions

            @type origin: int
            @type dest: int
            @type model: TOAHModel
            @rtype: None|str
            """
            try:
                move(model, origin, dest)
            except IllegalMoveError:
                print("That's invalid. Choose other stools. \n")
            else:
                pass

        print("=" * 10 + "WELCOME TO THE TOUR OF ANNE HOY GAME" + "=" * 10)
        print("\n\n\nInstructions:\n-To exit the game, type '-1' when"
              "asked for the moves\n-Each stool is numbered, starting"
              "from 1")
        print("---Rules---")
        print("*Enter all information in numeral numbers")
        print("**The goal of this game is to stack all the cheeses onto the"
              " last stool")
        print(
            "***It is only possible to add cheeses on top of a larger cheese")
        print("****Only can move existing cheese on a stool")
        print("*****to EXIT type in -1 as destination")
        print("")

        model = TOAHModel(self.number_of_stools)
        model.fill_first_stool(self.number_of_cheeses)
        print(model.__str__())
        print('')
        print("Begin")
        print("")
        origin = 0
        dest = 0
        while origin != -1 and dest != -1:
            origin = int(input("Move from stool: "))
            if origin == -1:
                break
            dest = int(input("To stool: "))
            if dest == -1:
                break
            while ((origin > model.num_of_stools - 1) or (origin < 0)
                   or (dest > model.num_of_stools - 1) or (dest < 0)
                   or (len(model._stools[origin]) == 0)
                   or (len(model._stools[dest]) > 0 and
                       (model.get_top_cheese(origin).size >
                        model.get_top_cheese(dest).size))):
                exception_handler(origin, dest, model)
                origin = int(input("Move from stool: "))
                dest = int(input("To stool: "))
            move(model, origin, dest)
            print(model.__str__())
Beispiel #24
0
                print("!!!!!!You caused an error!!!!!!!")
                print(error)
            print(game)
            start = input("type 'exit' to exit or press enter to continue")


if __name__ == '__main__':
    stool = int(
        input(
            "Enter the number of stools you would want to play the game with: "
        ))
    if stool <= 0:
        while stool <= 0:
            print('Number of stools have to be greater than 0')
            stool = int(input('Enter again: '))
    model = TOAHModel(stool)
    cheese = int(
        input(
            "Now, enter the number of cheeses you would want to play the game "
            "with: "))
    if cheese <= 0:
        while cheese <= 0:
            print('Number of cheeses have to be greater than 0')
            cheese = int(input('Enter again: '))
    console = ConsoleController(cheese, stool)
    console.play_loop()
    # You should initiate game play here. Your game should be playable by
    # running this file.
    # Leave lines below as they are, so you will know what python_ta checks.
    # You will need consolecontroller_pyta.txt in the same folder.
    import python_ta
Beispiel #25
0
    @type m: number of cheese intermediate stool
    @type model: TOAHModel
        TOAHModel with tower of cheese on first stool and three empty
        stools
    @type delay_btw_moves: float
        time delay between moves if console_animate is True
    @type animate: bool
        animate the tour or not
    """
    count = 0
    # lets move n cheeses to a holding stool
    count += move_cheeses(model, m, 0, 1, 2)
    count += move_cheeses(model, n - m, 0, 1, 3)
    count += move_cheeses(model, m, 2, 0, 3)
    return count


if __name__ == '__main__':
    #import doctest
    #doctest.testmod()

    for c in range(4, 10):
        print('num_cheese', c)
        # for n in range(2,7):
        # for n in range(2, min([7,c])):
        for n in range(1, c - 1):
            print('num_cheese intermed', n)
            mod = TOAHModel(4)
            mod.fill_first_stool(c)
            print(tour_of_four_stools_testing(mod, c, n))