Robopuppy Redux

An interactive fiction by J.D. Clemens (2007) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Section E - Erasing

Erasing is an action applying to one visible thing. Understand "erase [nonblank command]" as erasing.

Check erasing:
    if Robopuppy is scripted, say "Robopuppy is already performing a command." instead;
    if the learning flag is true, say "Robopuppy is learning a command right now." instead.
    
Carry out erasing:
    say "You order Robopuppy to erase the [the message of the noun] command.";
    now the noun is blank;
    change the message of the noun to "";
    repeat through the Table of Stored Commands begin;
        if the command entry is the noun, blank out the whole row;
    end repeat.