Interactive Poetic Interludes

version 2 by Kazuki Mishima

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 6 - Choosing a Line

    Topic-choosing is an action out of world applying to one topic.

    Understand "[text]" as topic-choosing when Poetic Interlude is happening.

    Instead of doing something other than topic-choosing when Poetic Interlude is happening: try topic-choosing the player's command.

    Carry out topic-choosing:
        let the found row be the row that matches the player's command in the textual content of the current poem;
        say "1"; [ debugging -- please ignore ]
        if the found row is not 0 begin;
            say "2"; [ debugging -- please ignore ]
            choose row the found row from the textual content of the current poem;
            let X be the line entry;
            let T be the topic entry as a number;
            say "3"; [ debugging -- please ignore ]
            if the line-number entry < the current line, change the current line to the line-number entry; [ backs up ]
            say "4"; [ debugging -- please ignore ]
            if the current line is the line-number entry begin;
                say "5"; [ debugging -- please ignore ]
                choose row current line in the table of selected lines;
                change the line entry to X;
                change the topic entry to T as a topic;
                increase the current line by 1;
                rule succeeds;
            otherwise;
                now the unknown words message is the line corresponding to an informational message of word-not-valid-yet in the table of informational messages ;
                rule fails;
            end if;
        end if;
        ; [ Everything from here down is probably obsolete. ]
        say "6"; [ debugging -- please ignore ]
        change the found row to the row that matches the topic understood in the table of selected lines;
        say "7"; [ debugging -- please ignore ]
        if the found row is 0 begin;
            now the unknown words message is the line corresponding to an informational message of word-not-valid in the table of informational messages;
            rule fails;
        otherwise;
            [now the unknown words message is "(DEBUGGING: chose an old line.)";]
            rule succeeds; [ This branch might now be obsolete. ]
        end if.