Sheep Crossing — 4 of 18

Andrew Geng

Release 1

Section - Room setup

To say the opposite bank description:

if there are portable animals in the opposite bank of the location:

say "You can make out [list of portable animals in the opposite bank of the location with indefinite articles] on the opposite bank";

otherwise:

say "Across the water lies [the opposite bank of the location]".

To say the East bank description:

if the location is the East bank:

if the player is in the East bank for the first time:

say "On [the briefing message], you find yourself";

otherwise:

say "You are";

if the player is in the boat:

say " bobbing unsteadily in a boat by";

otherwise:

say " standing on";

say " a muddy riverbank";

otherwise:

say "[the opposite bank description]".

To say the West bank description:

if the location is the West bank:

say "You are";

if the player is in the boat:

say " bobbing unsteadily in a boat by";

otherwise:

say " standing on";

say " a muddy riverbank. The path to Grandmother's house continues to the west";

otherwise:

say "[the opposite bank description]".

The East bank is a room. "[the east bank description]."

The West bank is west of the East bank. "[the west bank description]."

The player is in the East bank. The description of the player is "Adorable and nerdy." The carrying capacity of the player is 1.

After deciding the scope of the player:

if the location is the East bank, place the West bank in scope;

if the location is the West bank, place the East bank in scope.

After printing the locale description of a room (this is the describe the inventory animals rule):

if there are portable animals carried by the player:

say "You are carrying [list of portable animals carried by the player with indefinite articles].[paragraph break]"

Oppositeness relates one room to another (called the opposite bank).

The verb to be opposite from implies the oppositeness relation.

The East bank is opposite from the West bank.

After printing the locale description of a room (this is the describe the opposite bank rule):

if there are portable animals in the opposite bank of the location:

say "On the far side of the river, you can see [list of portable animals in the opposite bank of the location with indefinite articles].";

otherwise:

say "To the [if the opposite bank of the location is the West bank]west[otherwise]east[end if], across the river, lies the [opposite bank of the location]."

Instead of examining a direction (called the heading):

let the target be the room-or-door heading from the location;

if the target is nowhere:

continue the action;

otherwise:

try examining the target.