Questions

version 5 by Michael Callaghan

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Adding our own rules
    We can add our own rules in the game. For example:
        A number question rule (this is the set age rating rule):
            if the current question is "How old are you?":
                if the number understood is less than 5:
                    say "It seems unlikely that a person of such tender years would be playing this game.";
                    retry;
                if the number understood is greater than 111:
                    say "I find it hard to believe that this is your real age. Please be more realistic.";
                    retry;
                if the number understood is less than 21:
                    say "Setting the game mode to mild!";
                    now gamemode is mild;
                otherwise:
                    say "Setting the game mode to crude!";
                    now gamemode is crude;
                exit.
        A menu question rule (this is the channel rule):
            if the current question is "Which channel would you like to watch on the telly?":
                if the number understood is 1:
                    say "Raucous music blasts out from the local music TV station.";
                if the number understood is 2:
                    say "The film that comes on is so raunchy that even a hard-bitten army sergeant would blush with shame";
                if the number understood is 3:
                    say "The latest trend in reality TV assails you - celebrity navel transplants!";
                if the number understood is 4:
                    say "You stomach turns with disgust - the collected speeches of George Bush begin to play.";
                exit.