Test - clear screen D — 2 of 3

Py

Release 1

Section 1 - preperations

Include Basic Screen Effects by Emily Short.

The initial room description rule is not listed in the startup rulebook.

Before constructing the status line:

clear only the status line.

To say locale details: describe locale for the holder of the player.

To decide what object is as far as you can see: (- (visibility_ceiling) -).

Rule for constructing the status line:

let info be indexed text;

let info be "[locale details]";

let K be the number of lines in info;

repeat with L running from 1 to K:

let passage be line number L in info;

repeat with M running from 1 to K:

replace unpunctuated word number (10 * M) in passage with "[unpunctuated word number (10 * M) in passage][line break]";

replace line number L in info with passage;

let K be the number of lines in info;

let P be the number of paragraphs in info;

unless K is 0, let K be K + (P - 1);

let whereabouts be indexed text;

let whereabouts be "[the player's surroundings][if the holder of the player is not as far as you can see and not in darkness and the holder of the player is a supporter] (on [the holder of the player])[otherwise if the holder of the player is a container and the holder of the player is not as far as you can see and not in darkness] (in [the holder of the player])[end if][if the description of the holder of the player is empty or in darkness].[otherwise]: [description of the holder of the player][end if]";

let N be the number of unpunctuated words in whereabouts;

let N be N / 10;

repeat with M running from 1 to N:

replace unpunctuated word number (10 * M) in whereabouts with "[unpunctuated word number (10 * M) in whereabouts][line break]";

let N be the number of lines in whereabouts;

unless K is 0 or in darkness:

deepen the status line to N + 1 + K rows;

otherwise:

deepen the status line to N rows;

move the cursor to 1;

say "[whereabouts][unless in darkness][line break][info][end if]".

MyWanna is a indexed text that varies. MyWanna is "lirl34";

After reading a command:

Now MyWanna is "[the player's command]";

Clear the screen;

say "[line break]";

if the player's command matches "look" or the player's command matches "l":

say "Please specify the object that you are looking at: 'look at chair'.";

reject the player's command;

if the player's command matches "north" or the player's command matches "go north" or the player's command matches "n":

try silently going north;

Reject the player's command;

if the player's command matches "south" or the player's command matches "go south" or the player's command matches "s":

try silently going south;

Reject the player's command;

if the player's command matches "east" or the player's command matches "go east" or the player's command matches "e":

Try silently going east;

Reject the player's command;

if the player's command matches "west" or the player's command matches "go west" or the player's command matches "w":

Try silently going west;

Reject the player's command;

if the player's command matches "up" or the player's command matches "go up" or the player's command matches "u":

Try silently going up;

Reject the player's command;

if the player's command matches "down" or the player's command matches "go down" or the player's command matches "d":

Try silently going down;

Reject the player's command;

[Understand "upstairs" as up. Understand "downstairs" as down.]

A room can be open-air or not open-air. A room is usually open-air.