From: Mark Oteiza Date: Wed, 18 Jan 2017 04:15:25 +0000 (-0500) Subject: Set up combination and random item location X-Git-Tag: emacs-26.0.90~777 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7455c2ad80ec0cdf009d9f2396127c58ded2dc3c;p=emacs.git Set up combination and random item location * lisp/play/dunnet.el (dun-combination): Make defconst. (tloc, tcomb): Remove. Replace with a top-level form. --- diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 95a9e9ce7d0..1c8fab05092 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -1123,6 +1123,8 @@ treasures for points?" "4" "four") ("What network protocol is used between pokey and gamma?" "tcp/ip" "ip" "tcp"))) +(defconst dun-combination (prin1-to-string (+ 100 (random 899)))) + ;;;; Mode definitions for interactive mode (define-derived-mode dun-mode text-mode "Dungeon" @@ -2964,12 +2966,9 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (dun-uexit nil))) -(setq tloc (+ 60 (random 18))) -(dun-replace dun-room-objects tloc - (append (nth tloc dun-room-objects) (list 18))) - -(setq tcomb (+ 100 (random 899))) -(setq dun-combination (prin1-to-string tcomb)) +(let ((tloc (+ 60 (random 18)))) + (dun-replace dun-room-objects tloc + (append (nth tloc dun-room-objects) (list 18)))) ;;;; ;;;; This section defines the DOS emulation functions for dunnet