Commit a87c4c30 authored by David Kastrup's avatar David Kastrup
Browse files

(mpuz-random-puzzle): Fix potential lockup when

`mpuz-allow-double-multiplicator' is non-zero, and correct
calculation of `min'.
parent e0f95693
2007-02-04 David Kastrup <dak@gnu.org>
* play/mpuz.el (mpuz-random-puzzle): Fix potential lockup when
`mpuz-allow-double-multiplicator' is non-zero, and correct
calculation of `min'.
2007-02-04 Per Abrahamsen <abraham@dina.kvl.dk>
 
* wid-edit.el (widget-default-create): Insert new text at the
......@@ -262,8 +262,9 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
(fillarray mpuz-board nil) ; erase the board
;; A,B,C,D & E, are the five rows of our multiplication.
;; Choose random values, discarding cases with leading zeros in C or D.
(let* ((A (+ 112 (random 888)))
(min (1+ (/ 1000 A)))
(let* ((A (if mpuz-allow-double-multiplicator (+ 112 (random 888))
(+ 125 (random 875))))
(min (1+ (/ 999 A)))
(B1 (+ min (random (- 10 min))))
B2 C D E)
(while (if (= B1 (setq B2 (+ min (random (- 10 min)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment