Achievements

version 4/080508 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 2(k) - Initialization

    To perform initialization:
        let the total be 0;
        repeat through the Table of Scored Places:
            change the used entry to 0;
            increase the total by the points entry;
            if the loci entry is the location:
                change the used entry to -1;
                increase the score by the points entry;
        repeat through the Table of Scored Objects:
            change the used entry to 0;
            increase the total by the points entry;
            if the object entry is enclosed by the player:
                change the used entry to -1;
                increase the score by the points entry;
        repeat through the Table of Achievements:
            increase the total by the points entry;
            change the used entry to 0;
        change the achievement maximum score to the total.

    Before printing the name of a room:
        if Achievement-Init is 0:
            perform initialization;
            change Achievement-Init to 1.