fixed rate argument for run-movie, Closes PR13642

This commit is contained in:
Matthias Felleisen 2013-03-30 18:06:14 -04:00
parent 68f526c2ed
commit 1ff3e3b942
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,13 @@
#lang racket
(require 2htdp/universe 2htdp/image)
(define (make-images i)
(cond
[(zero? i) '()]
[else (cons (place-image DOT 50 (* 50 i) BACKGROUND) (make-images (sub1 i)))]))
(define DOT (circle 3 'solid 'red))
(define BACKGROUND (empty-scene 100 400))
(run-movie 8 (make-images 8))

View File

@ -327,7 +327,7 @@
[hgt (image-height fst)]) [hgt (image-height fst)])
(big-bang (big-bang
m* m*
(on-tick rest r) (on-tick rest (/ 1 r))
(on-draw (lambda (m) (if (empty? m) (text "The End" 22 'red) (first m)))) (on-draw (lambda (m) (if (empty? m) (text "The End" 22 'red) (first m))))
(stop-when empty?)))) (stop-when empty?))))

View File

@ -11,6 +11,7 @@ run() {
cd tests cd tests
run key-error.rkt run key-error.rkt
run run-movie.rkt
run bad-draw.rkt run bad-draw.rkt
run error-in-tick.rkt run error-in-tick.rkt
run error-in-draw.rkt run error-in-draw.rkt