[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7455c2a 4/4: Set up combination and random item loc
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] master 7455c2a 4/4: Set up combination and random item location |
Date: |
Sun, 19 Feb 2017 08:50:12 -0500 (EST) |
branch: master
commit 7455c2ad80ec0cdf009d9f2396127c58ded2dc3c
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
Set up combination and random item location
* lisp/play/dunnet.el (dun-combination): Make defconst.
(tloc, tcomb): Remove. Replace with a top-level form.
---
lisp/play/dunnet.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el
index 95a9e9c..1c8fab0 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