8.14. More flexible descriptions of whereabouts

| Chapter 8: Change |

| 8.14. More flexible descriptions of whereabouts

The examples just given were all basically of the form "X relation Y" where X and Y were specific names of things. For example,

> if the genie's lamp is carried by Cinderella ...
> if the genie's lamp is inside the cupboard ...

Just as actions could be described with patterns to be matched ("taking an open container", say), so can the positions of things. Giving subtler descriptions of our X and Y sometimes broadens the possibilities, sometimes narrows them:

> if the genie's lamp is carried by a woman ...
> if the genie's lamp is inside the closed cupboard ...

In the first case, Y is allowed to be one of a whole range of things - any of the women existing in the world. This makes for a broader condition. In the second case, Y has not only to be the cupboard, but at a time when it is closed: which makes for a narrower condition. We can, of course, also vary X:

> if an animal is inside the cupboard ...
> if a container is carried ...

And we can even vary both X and Y at once:

> if a woman is holding an animal ...

a condition which will be true if, anywhere in the game's world, any woman is holding any animal.

Previous | Contents | Next