diff options
author | Paul Eggert <eggert@twinsun.com> | 1993-08-01 20:50:07 +0000 |
---|---|---|
committer | Paul Eggert <eggert@twinsun.com> | 1993-08-01 20:50:07 +0000 |
commit | c9575b25acfec3493b56d63deb78c7e19ae0ec8c (patch) | |
tree | 708cf7ca7f60433b7c1503f29264c8cb4b5d78a7 /lisp/play | |
parent | e00fcc05ecc69e9f0d74a25d021c43528c08004c (diff) | |
download | emacs-c9575b25acfec3493b56d63deb78c7e19ae0ec8c.tar.gz |
(mpuz-random): Remove.
All callers changed to use `random' instead.
Diffstat (limited to 'lisp/play')
-rw-r--r-- | lisp/play/mpuz.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index b0d7aeaab0c..d04889f8a6f 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el @@ -33,11 +33,6 @@ (random t) ; randomize -(defun mpuz-random (n) - "Return a random integer between 0 and N - 1 inclusive." - (setq n (% (random) n)) - (if (< n 0) (- n) n)) - (defvar mpuz-silent nil "*Set this to T if you don't want dings on inputs.") @@ -142,7 +137,7 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." (index 10) elem) (while letters - (setq elem (nth (mpuz-random index) letters) + (setq elem (nth (random index) letters) letters (delq elem letters) index (1- index)) (aset mpuz-digit-to-letter index elem) @@ -185,8 +180,8 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." ;; A,B,C,D & E, are the five rows of our multiplication. ;; Choose random values, discarding uninteresting cases. (while (progn - (setq A (mpuz-random 1000) - B (mpuz-random 100) + (setq A (random 1000) + B (random 100) C (* A (% B 10)) D (* A (/ B 10)) E (* A B)) |