Questions

version 5 by Michael Callaghan

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 4 - Processing text questions
    After reading a command when text question mode is true:
        now the current answer is the player's command;
        replace the regular expression "^say " in the current answer with "", case insensitively;
        follow the text question rules;
        if the outcome of the rulebook is the exit outcome:
            deactivate text question mode;
            follow the every turn rules;
            follow the advance time rule;
            reject the player's command;
        if the outcome of the rulebook is the retry outcome:
            reject the player's command;
        if the outcome of the rulebook is the parse outcome:
            deactivate text question mode.