+(define (draw-shot sh)
+ (to-origin)
+ (translate (assoc-ref sh 'x) (assoc-ref sh 'y))
+ (rotate (assoc-ref sh 'angle))
+ (draw-line 10))
+
+(define (move-shots shots)
+ (cond ((null? shots) '())
+ (else
+ (let* ((sh (car shots))
+ (x (assoc-ref sh 'x)) (y (assoc-ref sh 'y))
+ (angle (assoc-ref sh 'angle))
+ (r (degrees-to-radians (- angle))))
+ (set! x (+ x (* 10 (sin r))))
+ (set! y (+ y (* 10 (cos r))))
+ (cond ((and (<= x max-x)
+ (>= x min-x)
+ (<= y max-y)
+ (>= y min-y))
+ (cons `((x . ,x) (y . ,y) (angle . ,angle))
+ (move-shots (cdr shots))))
+ (else
+ (move-shots (cdr shots))))))))
+