Robopuppy ReduxAn interactive fiction by J.D. Clemens (2007) - the Inform 7 source text | ||||||||
| Home page Contents Next Complete text | Chapter 1 - Actions storing, replaying, and reporting
Section A - Action storing A command is a kind of thing. A command has an indexed text called message. Understand the message property as describing a command. A command is either blank or nonblank. A command is usually blank. Table of Stored Commands
The current command is a command that varies. The command index is a number that varies.The command index is 0. The learning flag is a truth state that varies. A person can be recorded. A person is usually not recorded. Every turn when the learning flag is true: now the player is recorded. To store the action: if the number of blank rows in the Table of Stored Commands is greater than 0 begin; choose a blank row in the Table of Stored Commands; change the command entry to the current command; change the index entry to the command index; change the undertaking entry to the current action; increase the command index by 1; otherwise; say "Robopuppy beeps unhappily, indicating that his memory is full."; change the learning flag to false; end if; now the player is not recorded. Action storing is an activity. The last for action storing rule: store the action. Rule for action storing while implicitly taking something: do nothing. Rule for action storing when unteachable: do nothing. This is the remembrances of things past rule: if the player is recorded, carry out the action storing activity. The remembrances of things past rule is listed first in the action-processing rules. |