Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; constants
- (define background (empty-scene 150 150))
- (define red (place-image (circle 70 255 "red") 75 75 background))
- (define yellow (place-image (circle 70 255 "yellow") 75 75 background))
- (define green (place-image (circle 70 255 "green") 75 75 background))
- (define (FunctionForDraw x)
- (cond
- [(string=? "green" x) red]
- [(string=? "red" x) yellow]
- [(string=? "yellow" x) green]))
- (define (FunctionForTick x)
- (+ 1 x))
- ; functions
- (define svetofor
- (big-bang "green"
- (to-draw FunctionForDraw)
- (on-tick FunctionForTick 2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement