Patch from Jon Wilson: added a home function
svn: r14698
This commit is contained in:
parent
a1d943146b
commit
26667f2275
|
@ -1,7 +1,7 @@
|
|||
#lang scheme/signature
|
||||
|
||||
turtles
|
||||
clear
|
||||
clear home
|
||||
turn turn/radians
|
||||
move move-offset
|
||||
draw draw-offset
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user