Room & Dimension

version 1 by Sebastian Rahn

  • Home page
  • Beginning
  • Previous
  • Next



  • Part 3 - Moving on the map

    Section 3.1 - Walking between rooms

    Entrance point is a kind of thing.
    Entrance point is not marked for listing.

    EP room is a room.
    Tmp_X is a number that varies.
    Tmp_Y is a text that varies.
    Tmp_Y_number is a number that varies.

    North Entrance point is a kind of Entrance point.
    The printed name of North Entrance point is " _ ".
    South Entrance point is a kind of Entrance point.
    The printed name of South Entrance point is " _ ".
    West Entrance point is a kind of Entrance point.
    The printed name of West Entrance point is "+ ".
    East Entrance point is a kind of Entrance point.
    The printed name of East Entrance point is " +".

    Table 994 - Junctures
    Entrance  Exit Point  Exit Room  Position_1  Position_2  Position_3  Height_1  Height_2  Height_3  Entrance_Height  
    a Room   a Room   a Room   a Text   a Text   a Text   a Number  a Number  a Number  a Number  

    Dummy_EP is a Entrance Point.
    tmp_Entrance is a Entrance point that varies.

    To switch maps:
    Change tmp_person to Compass;
    Change tmp_X to X-Axis of tmp_Person;
    Change tmp_Y to Y-Axis of tmp_Person;
    choose row with entrance of Freespace in Table 994;
    Change tmp_Entrance to Exit Point Entry;
    move tmp_Entrance to Exit Room Entry;
    Change Compass to tmp_Entrance;
    scan surroundings;
    Change tmp to Entrance_Height Entry;
    Change NoGo to true;
    If tmp_Entrance is a North Entrance Point [Northern Entrance]
    begin;
    choose row 3 in Table 995;
    If Middle Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    if Position_2 Entry is not ""
    begin;
    Change NoGo to false;
    Change Y-Axis of tmp_person to Position_2 Entry;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 3 in Table 995;
    If Left Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Position_1 Entry is not ""
    begin;
    Change NoGo to false;
    Change Y-Axis of tmp_person to Position_1 Entry;
    end if;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 3 in Table 995;
    If Right Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Position_3 Entry is not ""
    begin;
    Change NoGo to false;
    Change Y-Axis of tmp_person to Position_3 Entry;
    end if;
    end if;
    end if;
    end if;
    If tmp_Entrance is a South Entrance Point [Southern Entrance]
    begin;
    choose row 1 in Table 995;
    If Middle Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    if Position_2 Entry is not ""
    begin;
    Change NoGo to false;
    Change Y-Axis of tmp_person to Position_2 Entry;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 1 in Table 995;
    If Left Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Position_1 Entry is not ""
    begin;
    Change NoGo to false;
    Change Y-Axis of tmp_person to Position_1 Entry;
    end if;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 1 in Table 995;
    If Right Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Position_3 Entry is not ""
    begin;
    Change NoGo to false;
    Change Y-Axis of tmp_person to Position_3 Entry;
    end if;
    end if;
    end if;
    end if;
    If tmp_Entrance is a West Entrance Point [Western Entrance]
    begin;
    choose row 2 in Table 995;
    If Right Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    if Height_2 Entry is not 0
    begin;
    Change NoGo to false;
    Change X-Axis of tmp_person to Height_2 Entry;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 1 in Table 995;
    If Right Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Height_1 Entry is not 0
    begin;
    Change NoGo to false;
    Change X-Axis of tmp_person to Height_1 Entry;
    end if;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 3 in Table 995;
    If Right Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Height_3 Entry is not 0
    begin;
    Change NoGo to false;
    Change X-Axis of tmp_person to Height_3 Entry;
    end if;
    end if;
    end if;
    end if;
    If tmp_Entrance is a East Entrance Point [Eastern Entrance]
    begin;
    choose row 2 in Table 995;
    If Left Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    if Height_2 Entry is not 0
    begin;
    Change NoGo to false;
    Change X-Axis of tmp_person to Height_2 Entry;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 1 in Table 995;
    If Left Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Height_1 Entry is not 0
    begin;
    Change NoGo to false;
    Change X-Axis of tmp_person to Height_1 Entry;
    end if;
    end if;
    end if;
    If NoGo is true
    begin;
    choose row 3 in Table 995;
    If Left Space Entry is None
    begin;
    choose row with Exit Point of tmp_Entrance in Table 994;
    If Height_3 Entry is not 0
    begin;
    Change NoGo to false;
    Change X-Axis of tmp_person to Height_3 Entry;
    end if;
    end if;
    end if;
    end if;
    If NoGo is false
    begin;
    Change tmp_location to Exit Room Entry;
    If tmp_Entrance is North Entrance Point
    begin;
    Change X-Axis of tmp_person to tmp;
    end if;
    If tmp_Entrance is South Entrance Point
    begin;
    Change X-Axis of tmp_person to tmp;
    end if;
    Change sector tmp_Y and tmp_X in location of tmp_person to None; [Remove figure from old room and move it to new location]
    If tmp_Entrance is North Entrance point [North Entry]
    begin;
    Change sector Y-Axis of tmp_person and tmp in tmp_location to tmp_person;
    end if;
    If tmp_Entrance is South Entrance point [South Entry]
    begin;
    Change sector Y-Axis of tmp_person and tmp in tmp_location to tmp_person;
    end if;
    If tmp_Entrance is West Entrance point [West Entry]
    begin;
    choose row with Letters28 of Y-Axis of tmp_Entrance in Table 200;
    Change tmp_Y_Number to Number Entry;
    increase tmp_Y_Number by 1;
    Change sector tmp_Y_Number and X-Axis of tmp_person in tmp_location to tmp_person;
    end if;
    If tmp_Entrance is East Entrance point [East Entry]
    begin;
    If Y-Axis of tmp_Entrance is not "RE"
    begin;
    choose row with Letters28 of Y-Axis of tmp_Entrance in Table 200;
    Change tmp_Y_Number to Number Entry;
    decrease tmp_Y_Number by 1;
    Change sector tmp_Y_Number and X-Axis of tmp_person in tmp_location to tmp_person;
    otherwise;
    choose row with Sector Room of tmp_location in Table 997;
    choose row 1 in Table Entry;
    Change tmp_Y_Number to Width Entry;
    decrease tmp_Y_Number by 1;
    Change sector tmp_Y_Number and X-Axis of tmp_person in tmp_location to tmp_person;
    end if;
    end if;
    move tmp_Entrance to EP room;
    move tmp_person to tmp_location;
    otherwise;
    move tmp_Entrance to EP room;
    say "Your path is blocked.";
    end if.