Lisp Game Programming <Step11-4>
Step11の最後はshipが全て無くなったときにメッセージを出して終了するプログラム
;; Step11 <Game Over Message>
;; -----------------------------------------------------------------------------------------------
(defgeneric Game-over-message (score))
(defmethod Game-over-message (score) ; message Draw
"Draw game over message"
(when (= (n-ship score) 0)
(stop-sound) ; BGM stop
(sdl:draw-string-solid-* "GAME OVER" 208 232 :color sdl:*white* :font *menu-font*)
(sdl:update-display)
(sleep 5)
(sdl:push-quit-event)))