Advertisement
Guest User

Untitled

a guest
Dec 27th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ; constants
  2. (define background (empty-scene 150 150))
  3. (define red (place-image (circle 70 255 "red") 75 75 background))
  4. (define yellow (place-image (circle 70 255 "yellow") 75 75 background))
  5. (define green (place-image (circle 70 255 "green") 75 75 background))
  6. (define (FunctionForDraw x)
  7. (cond
  8. [(string=? "green" x) red]
  9. [(string=? "red" x) yellow]
  10. [(string=? "yellow" x) green]))
  11. (define (FunctionForTick x)
  12. (+ 1 x))
  13. ; functions
  14. (define svetofor
  15. (big-bang "green"
  16. (to-draw FunctionForDraw)
  17. (on-tick FunctionForTick 2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement