Child's Play

An interactive fiction by Stephen Granade (2007) - the Inform 7 source text

Chapter 7 - Fascination, Which Allows Babies to be Fixated on Objects

Fascination relates one thing to one person. The verb to fascinate (he fascinates, they fascinate, he fascinated, it is fascinated, he is fascinating) implies the fascination relation.

To decide if (victim - a person) is fixated on (focus - an object):
    if focus fascinates victim, decide yes;
    if focus is a person and focus encloses something that fascinates victim, decide yes;
    decide no.

To decide if (victim - a person) is not fixated on (focus - an object):
    if victim is fixated on focus, decide no;
    decide yes.

To say focus of (victim - a person):
    let f be a random thing that fascinates victim;
    say "[the f]".

Definition: a person is fixated if something fascinates it.

The source code to Child's Play is licensed under a Creative Commons NonCommercial Sampling Plus 1.0 License.