Function: bb-done
bb-done is an interactive and byte-compiled function defined in
blackbox.el.gz.
Signature
(bb-done)
Documentation
Finish the game and report score.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/blackbox.el.gz
(defun bb-done ()
"Finish the game and report score."
(interactive nil blackbox-mode)
(let (bogus-balls)
(cond
((not (= (length bb-balls-placed) (length bb-board)))
(message "There %s %d hidden ball%s; you have placed %d."
(if (= (length bb-board) 1) "is" "are")
(length bb-board)
(if (= (length bb-board) 1) "" "s")
(length bb-balls-placed)))
(t
(setq bogus-balls (bb-show-bogus-balls bb-balls-placed bb-board))
(if (= bogus-balls 0)
(message "Right! Your score is %d." bb-score)
(message "Oops! You missed %d ball%s. Your score is %d."
bogus-balls
(if (= bogus-balls 1) "" "s")
(+ bb-score (* 5 bogus-balls))))
(bb-goto '(-1 . -1))))))