The patch adds a function (home) which takes us back to only one turtle,
and puts that turtle back at the starting position. Just like clear,
but does not clear the screen.
Attached. This (third) patch is correct, I think. Sorry eli for the
triple post.
Regards,
Jon Wilson
--- /usr/lib/plt/collects/graphics/turtle-unit.ss 2008-11-16
14:34:52.000000000 -0500
+++ turtle-unit.ss 2009-05-02 11:04:58.000000000 -0400
@@ -227,6 +227,13 @@
(set! lines-in-drawing null)
(clear-window)))
+(define home
+ (lambda ()
+ (flip-icons)
+ (set! turtles-cache empty-cache)
+ (set! turtles-state (list clear-turtle))
+ (flip-icons)))
+
;; cache elements:
(define-struct c-forward (distance))
(define-struct c-turn (angle))
--- /usr/lib/plt/collects/graphics/turtle-sig.ss 2008-11-16
14:34:52.000000000 -0500
+++ turtle-sig.ss 2009-05-02 10:52:23.000000000 -0400
@@ -1,7 +1,7 @@
#lang scheme/signature
turtles
-clear
+clear home
turn turn/radians
move move-offset
draw draw-offset
_________________________________________________
For list-related administrative tasks:
http://list.cs.brown.edu/mailman/listinfo/plt-dev