Answer to Exercise 6

| ANSWER TO EXERCISE 6
| Define four objects along the lines of:
    Object white_obj "white wall" compass
      with name "white" "sac" "wall", article "the", door_dir n_to
      has  scenery;
and add the following line to `Initialise`:
    remove n_obj; remove e_obj; remove w_obj; remove s_obj;
(We could even `alias` a new `Property` called `white_to` to be `n_to`, and then enter map directions in the source code using Mayan direction names.) As a fine point of style, turquoise ( yax) is the world colour for 'here', so add a grammar line to make this cause a "look'':
    Verb "turquoise" "yax" * -> Look;

Back to the exercise in section 10

Mechanically translated to HTML from third edition as revised 16 May 1997. Copyright © Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.