This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1,18 @@
Hash Bar is a room.
Connection relates various texts to one number. The verb to be connected to implies the connection relation.
"foo" is connected to 12.
"bar" is connected to 34.
"baz" is connected to 56.
When play begins:
[change values]
now "bleck" is connected to 78;
[check values]
if "foo" is connected to 12, say "good.";
if "bar" is not connected to 56, say "good.";
[retrieve values]
let V be the number that "baz" relates to by the connection relation;
say "'baz' => [V].";
end the story.

View file

@ -0,0 +1,15 @@
Hash Bar is a room.
When play begins:
let R be a various-to-one relation of texts to numbers;
[initialize the relation]
now R relates "foo" to 12;
now R relates "bar" to 34;
now R relates "baz" to 56;
[check values]
if R relates "foo" to 12, say "good.";
if R does not relate "bar" to 56, say "good.";
[retrieve values]
let V be the number that "baz" relates to by R;
say "'baz' => [V].";
end the story.