Patrollers

version 12 by Michael Callaghan

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Restrictions by reference to map regions
    We can also confine a patroller to a specific region or exclude the patroller from specific regions. This is useful where the patroller is Aimless or Following and we want to confine the patroller's movements.
    To restrict a patroller to a region:
        To decide if (R - a Room) is off-limits to (P - a Patroller):
            if P is the troubled spirit:
                if the map region of R is the Graveyard:
                    decide no;
                decide yes;
            decide no.
    To prevent a patroller entering a region:
        To decide if (R - a Room) is off-limits to (P - a Patroller):
            if P is the truant:
                if the map region of R is the School Complex:
                    decide yes;
                decide no;
            decide no.
    The example "Border Dispute" shows the use of the these principles.