1
<HTML><HEAD><TITLE>Answer to Exercise 6</TITLE></HEAD>
2
<BODY BGCOLOR="#FFFFFF">
3
<TABLE><TR><TD Valign="top"><IMG SRC="../icons/exercise.gif" ALT="??"><TD bgcolor="#FAA89B"><B>ANSWER TO EXERCISE 6</B><TR><TD><TD>
6
Define four objects along the lines of:
8
Object white_obj "white wall" compass
9
with name "white" "sac" "wall", article "the", door_dir n_to
13
and add the following line to <TT>Initialise</TT>:
15
remove n_obj; remove e_obj; remove w_obj; remove s_obj;
18
(We could even <TT>alias</TT> a new <TT>Property</TT> called <TT>white_to</TT> to be
19
<TT>n_to</TT>, and then enter map directions in the source code using
20
Mayan direction names.)
21
As a fine point of style, turquoise (<I> yax</I>) is the world colour for
22
'here', so add a grammar line to make this cause a "look'':
24
Verb "turquoise" "yax" * -> Look;
28
<HR>Back to <A HREF="../section10.html#ex6">the exercise in section 10</A><HR>
29
<SMALL><I>Mechanically translated to HTML from third edition as revised 16 May 1997. Copyright © Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.</I></SMALL></BODY></HTML>