Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
3 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| TimeModeUtil | |
50.00% |
3 / 6 |
|
0.00% |
0 / 1 |
13.12 | |
0.00% |
0 / 1 |
| attemptStatusName | |
50.00% |
3 / 6 |
|
0.00% |
0 / 1 |
13.12 | |||
| 1 | <?php |
| 2 | |
| 3 | class TimeModeUtil |
| 4 | { |
| 5 | public static int $PROBLEM_COUNT = 10; |
| 6 | public static float $RATIO_OF_SOLVED_TO_SUCCEED = 0.79; |
| 7 | public static float $SECONDS_ADDED_PER_MOVE_PLAYED = 3; |
| 8 | |
| 9 | public static int $CATEGORY_BLITZ = 1; |
| 10 | public static int $CATEGORY_FAST_SPEED = 2; |
| 11 | public static int $CATEGORY_SLOW_SPEED = 3; |
| 12 | |
| 13 | public static int $CATEGORY_SLOW_SPEED_SECONDS = 240; |
| 14 | |
| 15 | public static int $SESSION_STATUS_IN_PROGRESS = 1; |
| 16 | public static int $SESSION_STATUS_FAILED = 2; |
| 17 | public static int $SESSION_STATUS_SOLVED = 3; |
| 18 | |
| 19 | public static int $ATTEMPT_RESULT_QUEUED = 1; |
| 20 | public static int $ATTEMPT_RESULT_SOLVED = 2; |
| 21 | public static int $ATTEMPT_RESULT_FAILED = 3; |
| 22 | public static int $ATTEMPT_STATUS_TIMEOUT = 4; |
| 23 | public static int $ATTEMPT_STATUS_SKIPPED = 5; |
| 24 | |
| 25 | public static function attemptStatusName($statusID): string |
| 26 | { |
| 27 | switch ($statusID) |
| 28 | { |
| 29 | case self::$ATTEMPT_RESULT_QUEUED: return 'queued'; |
| 30 | case self::$ATTEMPT_RESULT_SOLVED: return 'solved'; |
| 31 | case self::$ATTEMPT_RESULT_FAILED: return 'failed'; |
| 32 | case self::$ATTEMPT_STATUS_TIMEOUT: return 'timeout'; |
| 33 | case self::$ATTEMPT_STATUS_SKIPPED: return 'skipped'; |
| 34 | default: return 'unknown'; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | public static float $POINTS_RATIO_FOR_FINISHING = 0.4; |
| 39 | } |