Instead of Going

version 3/071115 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter 2(b) - Deciding rules

    Section 2(b)1 - To decide whether managing can't go

    To decide whether managing can't go (way - a direction) with (prop - text):
        let place be the room the way from the location;
        if place is a room, decide yes;
        if prop is "nothing"
        begin;
            if the general can't go of the location is "nothing"
            begin;
                if using the smart can't go to option
                begin;
                    list available exits;
                otherwise;
                    if using the smarter can't go to option
                    begin;
                        list available exits, mentioning visited rooms;
                    otherwise;
                        if using the smartest can't go to option
                        begin;
                            list available exits, mentioning all rooms;
                        otherwise;
                            decide yes;
                        end if;
                    end if;
                end if;
            otherwise;
                say "[general can't go of the location][paragraph break]";
            end if;
        otherwise;
            say "[prop][paragraph break]";
        end if;
        decide no.