A Humble Wayside Flower
Example 237
★★★First we define the relationships we choose to acknowledge:
"A Humble Wayside Flower"
Marriage relates one person to another (called the spouse). The verb to be married to means the marriage relation.
Fatherhood relates one person (called father) to various people. The verb to engender means the fatherhood relation.
For brevity, we will ignore the existence of mothers. It is a sad world.
Siblinghood relates a person (called A) to a person (called B) when a person who engenders A engenders B. The verb to be sibling to means the siblinghood relation.
Family relates a person (called A) to a person (called B) when A is married to B or A engenders B or B engenders A or A is sibling to B. The verb to be related to means the family relation.
A person can be known or unknown. After printing the name of an unknown person (called the alien):
if a known person (called the contact) is related to the alien:
say " ([relation between alien and contact] of [the contact])";
now the alien is known;
rule succeeds.
To say relation between (first party - a person) and (second party - a person):
if the first party is married to the second party:
if the first party is female, say "wife";
otherwise say "husband";
rule succeeds;
if the first party is sibling to the second party:
if the first party is female, say "sister";
otherwise say "brother";
rule succeeds;
if the first party engenders the second party:
say "father";
rule succeeds;
if the second party is the father of the first party:
if the first party is female, say "daughter";
otherwise say "son";
rule succeeds.
Pere Blanchard's Hut is a room. Percival Blakeney is a known man in the Hut. Marguerite is a woman in the Hut. Percival is married to Marguerite. Outside from the Hut is the Garden. Louise is a woman in the Garden. The Road to Paris is west of the Garden. Armand St Just is a man in the Road. Louise is married to Armand. Monsieur St Just is a man. He engenders Armand and Marguerite.
Test me with "out / west / east / west".
Test me with "out / west / east / west".
Pere Blanchard's Hut
You can see Percival Blakeney and Marguerite (wife of Percival Blakeney) here.
>(Testing.)
>[1] out
Garden
You can see Louise here.
>[2] west
Road to Paris
You can see Armand St Just (brother of Marguerite) here.
>[3] east
Garden
You can see Louise (wife of Armand St Just) here.
>[4] west
Road to Paris
You can see Armand St Just here.
You can see Percival Blakeney and Marguerite (wife of Percival Blakeney) here.
>(Testing.)
>[1] out
Garden
You can see Louise here.
>[2] west
Road to Paris
You can see Armand St Just (brother of Marguerite) here.
>[3] east
Garden
You can see Louise (wife of Armand St Just) here.
>[4] west
Road to Paris
You can see Armand St Just here.
Monsieur St Just never appears on the scene in this piece, but if we did put him somewhere the player could find him, he, too, would be properly introduced.