in" or "complete" as "[fill in]". Understand "[fill in] question [number] on [something preferably held]" or "[fill in] question [number]" or "[fill in] answer [number] on [something preferably held]" or "[fill in] answer [number]" as filling the blanks.
Understand "answer question" as a mistake ("Try saying 'COMPLETE QUESTION 1' in order to fill in the blanks on the worksheet.").
Understand "write [text] on [packet]" or "write [text] in [text]" or "write answer" as a mistake ("You need to specify which question to answer. Instead, try saying 'COMPLETE QUESTION 1', for example.").
A mode is a kind of value. The modes are off, page-mode, help-mode, or response-mode.
Answer mode is a mode that varies. Answer mode is off. Current question is a number that varies.
Filling the blanks is an action applying to one number and one thing.
Check filling the blanks:
if the player does not hold a scriber, say "You have nothing to write with." instead;
if the second noun is not a packet, say "There are no questions to answer here." instead;
if the number understood is greater than 3, say "There aren't that many questions on the worksheet!" instead.
Carry out filling the blanks:
now current question is the number understood;
change the command prompt to " >>>";
if current question is:
-- 1: say "[/l]Where was your explorer born?";
-- 2: say "[/l]What was your explorer's most famous discovery?";
-- 3: say "[/l]What year did your explorer make his first voyage?";
now answer mode is response-mode.
Rule for supplying a missing second noun while filling the blanks:
if a packet (called the pad) is carried:
change the second noun to the pad;
otherwise if a packet (called the pad) is touchable:
try taking the pad;
change the second noun to the pad;
otherwise:
say "You will have to specify where to write your answer.".
After reading a command when answer mode is response-mode:
let pad be a random packet held by the player;
let N be indexed text;
let N be "[player's command]" in sentence case;
if N matches the regular expression "<Oo>cean", change N to "Ocean route to the Orient";
if N matches the regular expression "<Rr>oute", change N to "Ocean route to the Orient";
if N matches the regular expression "<Ss>ines", change N to "Sines";
if current question is:
-- 1: change birthplace of the pad to N;
-- 2: change discovery of the pad to N;
-- 3: change year of the pad to N;
say "[/l]On what page did you find that information?";
now the answer mode is page-mode;
now the pad is marked;
reject the player's command.
After reading a command when answer mode is page-mode:
let pad be a random packet held by the player;
let N be indexed text;
let N be "[player's command]" in sentence case;
if current question is:
-- 1: change birthplace-page of the pad to N;
-- 2: change discovery-page of the pad to N;
-- 3: change year-page of the pad to N;
say "[/l]You fill in the blanks for question [current question] with that information.";
change the command prompt to ">";
now the answer mode is off;
reject the player's command.
Part 99 - Other random rules