Jewel: don't declife if game is over (thanks to David Einstein)
svn: r4691
This commit is contained in:
parent
5fc9e038d5
commit
4aa36a5ee9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user