示例#1
0
def tour_of_four_stools(model: TOAHModel, delay_btw_moves: float=0.5, 
                        console_animate: bool=False):
    """Move a tower of cheeses from the first stool in model to the fourth.

       model - a TOAHModel with a tower of cheese on the first stool
                and three other empty stools
       console_animate - whether to animate the tour in the console
       delay_btw_moves - time delay between moves in seconds IF 
                         console_animate == True
                         no effect if console_animate == False
    """
    n=model.number_of_cheese()
    
    if console_animate==True and delay_btw_moves:
        
        move_cheeses1(model,n,i,0,1,2,3)
        
    else:
        move_cheese2(model,n)