Room & Dimension

version 1 by Sebastian Rahn

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 1.8 - Decide if object is in range of another

    To decide whether (First Piece - a thing) is connected with (Second Piece - a thing):
    If location of First Piece is the location of Second Piece
    begin;
    scan surroundings of First Piece;
    repeat through Table 995
    begin;
    if Second Piece is Left Space Entry, decide yes;
    if Second Piece is Middle Space Entry, decide yes;
    if Second Piece is Right Space Entry, decide yes;
    end repeat;
    end if;
    decide no.

    To decide whether (First Piece - a thing) is not connected with (Second Piece - a thing):
    If location of First Piece is the location of Second Piece
    begin;
    scan surroundings of First Piece;
    repeat through Table 995
    begin;
    if Second Piece is Left Space Entry, decide no;
    if Second Piece is Middle Space Entry, decide no;
    if Second Piece is Right Space Entry, decide no;
    end repeat;
    end if;
    decide yes.