Patch from Jon Wilson: added a home function

svn: r14698
This commit is contained in:
Eli Barzilay 2009-05-03 20:43:26 +00:00
parent a1d943146b
commit 26667f2275
2 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#lang scheme/signature
turtles
clear
clear home
turn turn/radians
move move-offset
draw draw-offset

View File

@ -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))