Jewel: don't declife if game is over (thanks to David Einstein)

svn: r4691
This commit is contained in:
Matthew Flatt 2006-10-27 21:53:37 +00:00
parent 5fc9e038d5
commit 4aa36a5ee9

View File

@ -947,19 +947,19 @@
(define (declife)
(set! jewel-life (- jewel-life jewel-decay))
(if (< jewel-life 0.0)
(let*
( (score #f) (exit? #f)
)
; set life points to zero
(set! jewel-life 0.0)
; set high score if any
(high-score-set)
; end of game
(set! gamestate 'GAME-OVER)
(unless (eq? gamestate 'GAME-OVER)
(set! jewel-life (- jewel-life jewel-decay))
(if (< jewel-life 0.0)
(let* ( (score #f) (exit? #f) )
; set life points to zero
(set! jewel-life 0.0)
; set high score if any
(high-score-set)
; end of game
(set! gamestate 'GAME-OVER)
)
)
)
)
)
;check for minimum three adjacent elements