Counterfeit Monkey — 290 of 292

Emily Short

Release 6

Section 2 - Listwriters

[ This section identifies objects conforming to specifications. This is a way to test for a given open-ended puzzle (e.g., one looking for the player to wear a blindfold) whether the list of solutions is reasonable and conforms to expectation. ]

Understand "list fakes" as listing fakes. Listing fakes is an action out of world. Carry out listing fakes:

let N be the list of fake things;

sort N; say "[N]".

Understand "list abstracts" as listing abstracts. Listing Abstracts is an action out of world.

Carry out listing abstracts:

let N be the list of r-abstract things;

sort N;

say "[N]".

Understand "list clothes" as listing clothes. Listing clothes is an action out of world.

Carry out listing clothes:

let N be the list of wearable things;

sort N;

say "[N]".

Understand "list blindfolds" as listing blindfolds. Listing blindfolds is an action out of world.

Definition: a thing is lightweight if the heft of it is 1.

Carry out listing blindfolds:

let N be the list of wearable floppy lightweight things;

sort N;

say "[N]".

Understand "list longs" as listing longs. Listing longs is an action out of world.

Carry out listing longs:

let N be the list of long things;

sort N;

say "[N]".

After printing the name of something (called N) while listing longs:

if N is floppy:

say " (floppy)";

otherwise:

say " (strong)"

Understand "list noisy" as listing noisy. Listing noisy is an action out of world.

Carry out listing noisy:

let N be the list of noisy things;

sort N;

say "[N]".

Understand "list cat 5" as listing category five. Listing category five is an action out of world.

Carry out listing category five:

let N be the list of edible things which are not vegetables;

sort N;

say "[N]".

Understand "list liquid" as listing liquid. Listing liquid is an action out of world.

Carry out listing liquid:

let N be the list of fluid things;

sort N;

say "[N]".

Understand "list edible" as listing edible. Listing edible is an action out of world.

Carry out listing edible:

let N be the list of edible things;

sort N;

say "[N]".

Understand "list components" as listing components. Listing components is an action out of world.

Carry out listing components:

repeat with item running through synthesizable things:

say "[item][line break]";

Understand "list plurals" as listing plurals. Listing plurals is an action out of world.

Definition: a thing is movable:

if it is scenery:

no;

if it is fixed in place:

no;

if it is part of something:

no;

if it is a person:

no;

yes.

Carry out listing plurals:

let N be the list of plural-named things;

sort N;

say "[N][line break]".

Understand "remove plurals" as removing plurals. Removing plurals is an action out of world.

Carry out removing plurals:

repeat with N running through plural-named things:

try letter-removing "s" from N.

Understand "list animates" as listing animates. Listing animates is an action out of world.

Carry out listing animates:

say "[list of people]".

Understand "list size [number]" as listing size. Listing size is an action out of world applying to one number.

Carry out listing size:

repeat with item running through things:

if the heft of the item is the number understood:

say "[item][line break]";

[counting contents.]

[A thing can be either counted or uncounted.

When play begins:

say "The full list is [list of things in the repository].";

let C be 0;

now all things are uncounted;

let X-name be indexed text;

let Y-name be indexed text;

repeat with X running through things in the repository:

let X-name be the printed name of X;

if X is uncounted:

increase C by 1;

now X is counted;

say "Distinct name: [X-name].";

repeat with Y running through things in the repository:

if Y is uncounted:

let Y-name be the printed name of Y;

if X-name is Y-name:

now Y is counted;

say "I believe that makes [C] items with distinct names." ]

[Understand "list all sizes" as listing all sizes. Listing all sizes is an action out of world.

Carry out listing all sizes:

say "Size 0 (abstracts and the totally weightless):[line break]";

try listing size 0;

paragraph break;

say "Size 1:[line break]";

try listing size 1;

paragraph break;

say "Size 2:[line break]";

try listing size 2;

paragraph break;

say "Size 3:[line break]";

try listing size 3;

paragraph break;

say "Size 4:[line break]";

try listing size 4;

paragraph break;

say "Size 5:[line break]";

try listing size 5;

paragraph break;

say "Size 6:[line break]";

try listing size 6;

paragraph break;

say "Size 7:[line break]";

try listing size 7;

paragraph break;

say "Size 8:[line break]";

try listing size 8;

paragraph break;

say "Size 9 and up (large enough to crush the player on creation):[line break]";

repeat with N running from 9 to 20:

try listing size N;

paragraph break; ]