Multi-examine

version 3 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next



  • section 2 - The class tree


    [ Relying on I7's single-dependancy class-chain, we find the highest valued class for the first object in the multiple object list, and then check that all the others belong to this class, and that they don't belong to anything further. ]


    Include (-

    [ MultiClassRepObject i j maxclass;

    objectloop(i ofclass Class && i >= K4_door && multiple_object-->1 ofclass i)
    { for (j = 2: j <= multiple_object-->0 : j++)
            if (~~(multiple_object-->j ofclass i)) return maxclass;
        maxclass = i;
    }
    return maxclass;
    ];
    -).