diff options
| author | Paul Eggert | 1993-08-01 20:50:07 +0000 |
|---|---|---|
| committer | Paul Eggert | 1993-08-01 20:50:07 +0000 |
| commit | 93cc044bd667a606c72f5d86e05dbc511a27337f (patch) | |
| tree | 9c5dd2810e32f6d2b80921162680e4f7ec2e7e2b | |
| parent | f7e55318b414a72cd0fc81525c2d4983a1033494 (diff) | |
| download | emacs-93cc044bd667a606c72f5d86e05dbc511a27337f.tar.gz emacs-93cc044bd667a606c72f5d86e05dbc511a27337f.zip | |
(dun-endgame-question, tcom, tloc):
Use (random N) instead of combination of %, abs and random.
| -rw-r--r-- | lisp/play/dunnet.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index e45f7ff3118..165fb0d8c1c 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el | |||
| @@ -1038,7 +1038,7 @@ for a moment, then straighten yourself up. | |||
| 1038 | (let (which i newques) | 1038 | (let (which i newques) |
| 1039 | (setq i 0) | 1039 | (setq i 0) |
| 1040 | (setq newques nil) | 1040 | (setq newques nil) |
| 1041 | (setq which (% (abs (random)) (length dun-endgame-questions))) | 1041 | (setq which (random (length dun-endgame-questions))) |
| 1042 | (dun-mprincl "Your question is:") | 1042 | (dun-mprincl "Your question is:") |
| 1043 | (dun-mprincl (setq dun-endgame-question (car | 1043 | (dun-mprincl (setq dun-endgame-question (car |
| 1044 | (nth which | 1044 | (nth which |
| @@ -2990,11 +2990,11 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") | |||
| 2990 | 2990 | ||
| 2991 | 2991 | ||
| 2992 | (random t) | 2992 | (random t) |
| 2993 | (setq tloc (+ 60 (% (abs (random)) 18))) | 2993 | (setq tloc (+ 60 (random 18))) |
| 2994 | (dun-replace dun-room-objects tloc | 2994 | (dun-replace dun-room-objects tloc |
| 2995 | (append (nth tloc dun-room-objects) (list 18))) | 2995 | (append (nth tloc dun-room-objects) (list 18))) |
| 2996 | 2996 | ||
| 2997 | (setq tcomb (+ 100 (% (abs (random)) 899))) | 2997 | (setq tcomb (+ 100 (random 899))) |
| 2998 | (setq dun-combination (prin1-to-string tcomb)) | 2998 | (setq dun-combination (prin1-to-string tcomb)) |
| 2999 | 2999 | ||
| 3000 | ;;;; | 3000 | ;;;; |