Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (require 2htdp/universe)
- (require 2htdp/image)
- (define red (square 500 "solid" "red"))
- (define green (square 500 "solid" "green"))
- (define (updatews ws)
- (make-happy (happy-word ws) (add1 (happy-num ws))))
- (define-struct happy (word num))
- (define initialws (make-happy "Happy Holidays!!!" 1))
- (define (draw ws)
- (place-image (text (happy-word ws) 64 (if (even? (happy-num ws)) "green" "red")) 250 250
- (if (even? (happy-num ws)) red green)))
- (big-bang initialws
- (to-draw draw)
- (on-tick updatews .5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement