(define (reset-flowers flowers)
[when (method-in-interface?
'snap-back-after-regions? card<%>)
(broadcast flowers snap-back-after-regions? #t)]
(broadcast* flowers
(face-down)
(dim #f)
(user-can-flip #f)
(snap-back-after-move #t)
(user-can-move #f))
flowers)
(define (wiggle-flower-in-garden flower garden)
(let* ((table (send garden get-table))
(layout (send garden get-layout))
(x-offset (send layout get-flower-wiggle-x-offset flower))
(y-offset (send layout get-flower-wiggle-y-offset flower)))
(let-values (([x y] (send table card-location flower)))
(send table move-card flower
(- x x-offset) (+ y y-offset))
(send table move-card flower
(+ x x-offset) (- y y-offset))
(send table move-card flower x y)) ))
(define (flower-save-state flower)
(list (send flower face-down?)
(send flower user-can-flip)
(send flower snap-back-after-move)
(send flower user-can-move)
(send flower home-region)))
(define (flower-restore-state flower state)
(if (first state)
(send flower face-down)
(send flower face-up))
(send flower user-can-flip (second state))
(send flower snap-back-after-move (third state))
(send flower user-can-move (fourth state))
(send flower home-region (fifth state)))
(define (make-flowers flowers)
(reset-flowers flowers))