~ubuntu-branches/ubuntu/gutsy/inform/gutsy

« back to all changes in this revision

Viewing changes to html/answers1/answer6.html

  • Committer: Bazaar Package Importer
  • Author(s): Mark Baker
  • Date: 2004-03-29 23:52:44 UTC
  • Revision ID: james.westby@ubuntu.com-20040329235244-fox1z1yv7d6vojoo
Tags: upstream-6.30
ImportĀ upstreamĀ versionĀ 6.30

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
4
<P>
 
5
 
 
6
Define four objects along the lines of:
 
7
<PRE>
 
8
Object white_obj "white wall" compass
 
9
  with name "white" "sac" "wall", article "the", door_dir n_to
 
10
  has  scenery;
 
11
</PRE>
 
12
 
 
13
and add the following line to <TT>Initialise</TT>:
 
14
<PRE>
 
15
remove n_obj; remove e_obj; remove w_obj; remove s_obj;
 
16
</PRE>
 
17
 
 
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'':
 
23
<PRE>
 
24
Verb "turquoise" "yax" * -&#62; Look;
 
25
</PRE>
 
26
 
 
27
</TABLE>
 
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 &#169; Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.</I></SMALL></BODY></HTML>