Example #1
0
 def demo_shrooms(self, levels=6):
     path = systems.shroom_fractal(levels)
     koopa = draw.KoopaTroopa(position=(-360,-150), step=3, heading=330)
     koopa.add_mappings({'a':'draw', 'b':'draw'})
     koopa.hideturtle()
     return koopa, path
Example #2
0
 def test_shroom_fractal(self):
     expected = 'a-b+a+b+a-b-a-b+a-b+a-b-a-b+a+b+a-b'
     self.assertEqual(expected, systems.shroom_fractal(2))