Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Score Rules

Alejandro Nieto edited this page Nov 4, 2020 · 1 revision
  1. In each level, a timer measures how much does the user last to complete the level, since the moment when all the right buttons hides, to the moment when the user presses "solve".
  2. For each second the user needs to complete a level, the punctuation will be reduced.
  3. The ranking system gives better punctuations for completing levels at first try.
  4. The ranking system lowers the score for needing more tries, but the more you try, the less will reduce.
  5. The user time at the operation, is the last time the user needed to complete the operation.
  6. There is a variable in $_SESSION where all the scores are added.
  7. Each time a level is successfully completed, the punctuation is added to the variable in $_SESSION.
  8. The ranking system avoids decimals. For that reason, in each operation all the numbers are rounded to the upper number (23,5 -> 24)

THE FORMULA:

((((squares * showTime)/good)-userTime)*100)/try

squares: The total amount of squares in the level (EX: 5x5 level makes 25 squares in total. This value is 25.)

showTime: The total amount of time the solution is showed to the user. (in seconds)

good: The total amount of correct squares in the level.

userTime: The total time the user needed to complete successfully the level (in seconds)

try: The number of try where the user is (MUST START IN 1.)

Clone this wiki locally