Answer to Exercise 8

| ANSWER TO EXERCISE 8
| This is a prime candidate for using variable strings `@nn`. Briefly: at the head of the source, define
    Lowstring east_str "east"; Lowstring west_str "west";
and then add two more routines to the game,
    [ NormalWorld; String 0 east_str; String 1 west_str; ];
    [ ReversedWorld; String 0 west_str; String 1 east_str; ];
where `NormalWorld` is called in `Initialise` or to go back to normal, and `ReversedWorld` when the reflection happens. Write `@00` in place of `east` in any double-quoted printable string, and similarly `@01` for `west`. It will be printed as whichever is currently set. (Inform provides up to 32 such variable strings.)

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.