summaryrefslogtreecommitdiffstats
path: root/battlestar/room.c
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2000-09-08 17:22:01 +0000
committerjsm <jsm@NetBSD.org>2000-09-08 17:22:01 +0000
commite78113b43d320fbf5b1a2323cb902663188952d0 (patch)
treeeb7044ea6a1803cfea9d3ba779dbeae434c9cba3 /battlestar/room.c
parentbed19f972cb4bcc628ec73e35c8e9f9e6b8c6341 (diff)
downloadbsdgames-darwin-e78113b43d320fbf5b1a2323cb902663188952d0.tar.gz
bsdgames-darwin-e78113b43d320fbf5b1a2323cb902663188952d0.zip
Make code clearer; add a macro ROOMDESC for the number of times a room
should be visited for the short description only to be used, and don't increment beenthere[position] beyond this value. From OpenBSD.
Diffstat (limited to 'battlestar/room.c')
-rw-r--r--battlestar/room.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/battlestar/room.c b/battlestar/room.c
index 8cdabae7..ddcd1fa4 100644
--- a/battlestar/room.c
+++ b/battlestar/room.c
@@ -1,4 +1,4 @@
-/* $NetBSD: room.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
+/* $NetBSD: room.c,v 1.8 2000/09/08 17:22:02 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)room.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: room.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
+__RCSID("$NetBSD: room.c,v 1.8 2000/09/08 17:22:02 jsm Exp $");
#endif
#endif /* not lint */
@@ -52,7 +52,7 @@ writedes()
int c;
printf("\n\t%s\n", location[position].name);
- if (beenthere[position] < 3) {
+ if (beenthere[position] < ROOMDESC) {
compass = NORTH;
for (p = location[position].desc; (c = *p++) != 0;)
if (c != '-' && c != '*' && c != '+')