#reader(lib "htdp-beginner-reader.ss" "lang")((modname falling-ball) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define WIDTH 320)
(define HEIGHT 480)
(define RADIUS 5)
(define (tick y)
(+ y 5))
(define (hits-floor? y)
(>= y (- HEIGHT RADIUS)))
(check-expect (hits-floor? 0) false)
(check-expect (hits-floor? HEIGHT) true)
(define (draw-scene y)
(place-image (circle RADIUS "solid" "red") (/ WIDTH 2) y
(empty-scene WIDTH HEIGHT)))
(big-bang WIDTH HEIGHT
10
(on-tick 1/15 tick)
(on-redraw draw-scene)
(stop-when hits-floor?))