Diff of /examples/towers_of_hanoi/test.py [9c0a10] .. [f16399]  Maximize  Restore

Switch to unified view

a/examples/towers_of_hanoi/test.py b/examples/towers_of_hanoi/test.py
...
...
10
def test(num_disks):
10
def test(num_disks):
11
    engine.reset()
11
    engine.reset()
12
    try:
12
    try:
13
        engine.activate('towers_of_hanoi')
13
        engine.activate('towers_of_hanoi')
14
  
14
  
15
        with engine.prove_goal('towers_of_hanoi.solve(%num_disks, $moves)',
15
        with engine.prove_goal('towers_of_hanoi.solve($num_disks, $moves)',
16
                               num_disks=num_disks) \
16
                               num_disks=num_disks) \
17
          as gen:
17
          as gen:
18
            for i, (vars, no_plan) in enumerate(gen):
18
            for i, (vars, no_plan) in enumerate(gen):
19
                print "got %d:" % (i + 1), vars['moves']
19
                print "got %d:" % (i + 1), vars['moves']
20
    except:
20
    except: