]> git.eshelyaron.com Git - emacs.git/commitdiff
(dun-endgame-question, tcom, tloc):
authorPaul Eggert <eggert@twinsun.com>
Sun, 1 Aug 1993 20:50:07 +0000 (20:50 +0000)
committerPaul Eggert <eggert@twinsun.com>
Sun, 1 Aug 1993 20:50:07 +0000 (20:50 +0000)
Use (random N) instead of combination of %, abs and random.

lisp/play/dunnet.el

index e45f7ff3118fd4b4f97532e1389fd9f625507b34..165fb0d8c1ce22dcd99c7d4db9313b52445b048e 100644 (file)
@@ -1038,7 +1038,7 @@ for a moment, then straighten yourself up.
   (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 @@ drwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..")
 
 
 (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))
 
 ;;;;