From 93d8d0137c32baeeffb3bfaf20d622d9143b3541 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 04 Feb 2010 17:01:55 +0000 Subject: multiturtle refactoring --- (limited to 'talogo.py') diff --git a/talogo.py b/talogo.py index 9349ef4..9bf3923 100644 --- a/talogo.py +++ b/talogo.py @@ -158,7 +158,7 @@ def calc_position(tw, t): def stop_logo(tw): tw.step_time = 0 tw.lc.step = just_stop() - tw.turtle_list.show_all() + tw.turtles.show_all() def just_stop(): yield False @@ -271,7 +271,7 @@ class LogoCode: 'textcolor':[0, lambda self: self.tw.canvas.textcolor], 'textsize':[0, lambda self: self.tw.textsize], 'tpos':[0, lambda self: self.tw.canvas.height/(self.tw.coord_scale*2)], - 'turtle':[1, lambda self, x: self.tw.canvas.set_turtle(int(x-1))], + 'turtle':[1, lambda self, x: self.tw.canvas.set_turtle(x)], 'userdefined':[1, lambda self,x: self.loadmyblock(x)], 'video':[1, lambda self,x: self.play_movie(x)], 'vres':[0, lambda self: self.tw.canvas.height/self.tw.coord_scale], @@ -573,11 +573,11 @@ class LogoCode: print "step is None" return False except StopIteration: - self.tw.turtle_list.show_all() + self.tw.turtles.show_all() return False except logoerror, e: self.showlabel(str(e)[1:-1]) - self.tw.turtle_list.show_all() + self.tw.turtles.show_all() return False return True -- cgit v0.9.1