Achievements

version 4/080508 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 2(f) - Ranking

    Table of Achievement Rankings
    minimum  rank  
    a number  text  


    To decide whether using ranking:
        if the number of filled rows in the Table of Achievement Rankings is at least 1, decide yes;
        decide no.

    To say announce the ranking:
        let mentioned be 0;
        let closest be -32767;
        let difference be 32767;
        repeat through the Table of Achievement Rankings:
            if score is at least the minimum entry and score - the minimum entry is less than difference:
                now difference is score - the minimum entry;
                now closest is the minimum entry;
        repeat through the Table of Achievement Rankings:
            if mentioned is 0 and closest is the minimum entry:
                now mentioned is 1;
                say "[rank entry]";
        if mentioned is 0, say "*** ERROR: Unknown rank ***".