Mercurial > emacs
changeset 4403:2d6328c324cd
(dun-endgame-question, tcom, tloc):
Use (random N) instead of combination of %, abs and random.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Sun, 01 Aug 1993 20:50:07 +0000 |
parents | 3cd121df96c8 |
children | 46f13ed25534 |
files | lisp/play/dunnet.el |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/play/dunnet.el Sun Aug 01 20:50:07 1993 +0000 +++ b/lisp/play/dunnet.el Sun Aug 01 20:50:07 1993 +0000 @@ -1038,7 +1038,7 @@ (let (which i newques) (setq i 0) (setq newques nil) - (setq which (% (abs (random)) (length dun-endgame-questions))) + (setq which (random (length dun-endgame-questions))) (dun-mprincl "Your question is:") (dun-mprincl (setq dun-endgame-question (car (nth which @@ -2990,11 +2990,11 @@ (random t) -(setq tloc (+ 60 (% (abs (random)) 18))) +(setq tloc (+ 60 (random 18))) (dun-replace dun-room-objects tloc (append (nth tloc dun-room-objects) (list 18))) -(setq tcomb (+ 100 (% (abs (random)) 899))) +(setq tcomb (+ 100 (random 899))) (setq dun-combination (prin1-to-string tcomb)) ;;;;