??ANSWER TO EXERCISE 33

We could solve this using a daemon, but for the sake of demonstrating a feature of thedark we won't. In Initialise, write thedark.initial = GoMothGo; and add the routine:

[ GoMothGo;
   if (moth in player)
   {   remove moth;
      "As your eyes try to adjust, you feel a ticklish sensation
       and hear a tiny fluttering sound.";
   }
];

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