Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Achievement
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3class Achievement extends AppModel
4{
5    public function __construct($id = false, $table = null, $ds = null)
6    {
7        $id['table'] = 'achievement';
8        parent::__construct($id, $table, $ds);
9    }
10
11    // Solved Count Achievements
12    public const int PROBLEMS_1000 = 1;
13    public const int PROBLEMS_2000 = 2;
14    public const int PROBLEMS_3000 = 3;
15    public const int PROBLEMS_4000 = 4;
16    public const int PROBLEMS_5000 = 5;
17    public const int PROBLEMS_6000 = 6;
18    public const int PROBLEMS_7000 = 7;
19    public const int PROBLEMS_8000 = 8;
20    public const int PROBLEMS_9000 = 9;
21    public const int PROBLEMS_10000 = 10;
22
23    // Special Awards
24    public const int USER_OF_THE_DAY = 11;
25
26    // Accuracy Achievements
27    public const int ACCURACY_I = 12;   // <1300, 75%
28    public const int ACCURACY_II = 13;  // <1300, 85%
29    public const int ACCURACY_III = 14; // <1300, 95%
30    public const int ACCURACY_IV = 15;  // 1300-1499, 75%
31    public const int ACCURACY_V = 16;   // 1300-1499, 85%
32    public const int ACCURACY_VI = 17;  // 1300-1499, 95%
33    public const int ACCURACY_VII = 18; // 1500-1699, 75%
34    public const int ACCURACY_VIII = 19; // 1500-1699, 85%
35    public const int ACCURACY_IX = 20;  // 1500-1699, 95%
36    public const int ACCURACY_X = 21;   // >=1700, 75%
37    public const int ACCURACY_XI = 22;  // >=1700, 85%
38    public const int ACCURACY_XII = 23; // >=1700, 95%
39
40    // Speed Achievements
41    public const int SPEED_I = 24;   // <1300, <20s
42    public const int SPEED_II = 25;  // <1300, <10s
43    public const int SPEED_III = 26; // <1300, <5s
44    public const int SPEED_IV = 27;  // 1300-1499, <18s
45    public const int SPEED_V = 28;   // 1300-1499, <13s
46    public const int SPEED_VI = 29;  // 1300-1499, <8s
47    public const int SPEED_VII = 30; // 1500-1699, <30s
48    public const int SPEED_VIII = 31; // 1500-1699, <20s
49    public const int SPEED_IX = 32;  // 1500-1699, <10s
50    public const int SPEED_X = 33;   // >=1700, <30s
51    public const int SPEED_XI = 34;  // >=1700, <20s
52    public const int SPEED_XII = 35; // >=1700, <10s
53
54    // Level Achievements
55    public const int LEVEL_UP = 36;
56    public const int FIRST_HERO_POWER = 37;
57    public const int UPGRADED_INTUITION = 38;
58    public const int MORE_POWER = 39;
59    public const int HALF_WAY_TO_TOP = 40;
60    public const int CONGRATS_MORE_PROBLEMS = 41;
61    public const int NICE_LEVEL = 42;
62    public const int DID_LOT_OF_TSUMEGO = 43;
63    public const int STILL_DOING_TSUMEGO = 44;
64    public const int THE_TOP = 45;
65
66    // Superior Accuracy
67    public const int SUPERIOR_ACCURACY = 46; // 100% accuracy on 100+ tsumegos
68
69    // Complete Sets Achievements
70    public const int COMPLETE_SETS_I = 47;
71    public const int COMPLETE_SETS_I_SETS_COUNT = 10;
72    public const int COMPLETE_SETS_II = 48;
73    public const int COMPLETE_SETS_II_SETS_COUNT = 20;
74    public const int COMPLETE_SETS_III = 49;
75    public const int COMPLETE_SETS_III_SETS_COUNT = 30;
76    public const int COMPLETE_SETS_IV = 50;
77    public const int COMPLETE_SETS_IV_SETS_COUNT = 40;
78    public const int COMPLETE_SETS_V = 51;
79    public const int COMPLETE_SETS_V_SETS_COUNT = 50;
80    public const int COMPLETE_SETS_VI = 52;
81    public const int COMPLETE_SETS_VI_SETS_COUNT = 60;
82
83    // No Error Streak Achievements
84    public const int NO_ERROR_STREAK_I = 53;
85    public const int NO_ERROR_STREAK_I_STREAK_COUNT = 10;
86    public const int NO_ERROR_STREAK_II = 54;
87    public const int NO_ERROR_STREAK_II_STREAK_COUNT = 20;
88    public const int NO_ERROR_STREAK_III = 55;
89    public const int NO_ERROR_STREAK_III_STREAK_COUNT = 30;
90    public const int NO_ERROR_STREAK_IV = 56;
91    public const int NO_ERROR_STREAK_IV_STREAK_COUNT = 50;
92    public const int NO_ERROR_STREAK_V = 57;
93    public const int NO_ERROR_STREAK_V_STREAK_COUNT = 100;
94    public const int NO_ERROR_STREAK_VI = 58;
95    public const int NO_ERROR_STREAK_VI_STREAK_COUNT = 200;
96
97    // Rating Achievements
98    public const int RATING_6_KYU = 59;
99    public const int RATING_5_KYU = 60;
100    public const int RATING_4_KYU = 61;
101    public const int RATING_3_KYU = 62;
102    public const int RATING_2_KYU = 63;
103    public const int RATING_1_KYU = 64;
104    public const int RATING_1_DAN = 65;
105    public const int RATING_2_DAN = 66;
106    public const int RATING_3_DAN = 67;
107    public const int RATING_4_DAN = 68;
108    public const int RATING_5_DAN = 69;
109
110    // Time Mode Achievements
111    // Slow mode
112    public const int TIME_MODE_APPRENTICE_SLOW = 70;
113    public const int TIME_MODE_SCHOLAR_SLOW = 71;
114    public const int TIME_MODE_LABOURER_SLOW = 72;
115    public const int TIME_MODE_ADEPT_SLOW = 73;
116    public const int TIME_MODE_EXPERT_SLOW = 74;
117    public const int TIME_MODE_MASTER_SLOW = 75;
118
119    // Fast mode
120    public const int TIME_MODE_APPRENTICE_FAST = 76;
121    public const int TIME_MODE_SCHOLAR_FAST = 77;
122    public const int TIME_MODE_LABOURER_FAST = 78;
123    public const int TIME_MODE_ADEPT_FAST = 79;
124    public const int TIME_MODE_EXPERT_FAST = 80;
125    public const int TIME_MODE_MASTER_FAST = 81;
126    // Blitz mode
127    public const int TIME_MODE_APPRENTICE_BLITZ = 82;
128    public const int TIME_MODE_SCHOLAR_BLITZ = 83;
129    public const int TIME_MODE_LABOURER_BLITZ = 84;
130    public const int TIME_MODE_ADEPT_BLITZ = 85;
131    public const int TIME_MODE_EXPERT_BLITZ = 86;
132    public const int TIME_MODE_MASTER_BLITZ = 87;
133    // Time Mode Precision
134    public const int TIME_MODE_PRECISION_I = 88;
135    public const int TIME_MODE_PRECISION_II = 89;
136    public const int TIME_MODE_PRECISION_III = 90;
137    public const int TIME_MODE_PRECISION_IV = 91;
138
139    // Special Sets
140    public const int LIFE_DEATH_ELEMENTARY = 92;
141    public const int LIFE_DEATH_INTERMEDIATE = 93;
142    public const int LIFE_DEATH_ADVANCED = 94;
143    public const int WEIQI_1000_FIRST_HALF = 95;
144    public const int WEIQI_1000_SECOND_HALF = 115;
145
146    // Sprint/Gold/Potion
147    public const int SPRINT = 96;       // sprint >= 30
148    public const int GOLD_DIGGER = 97;  // golden >= 10
149    public const int BAD_POTION = 98;   // potion >= 1
150
151    // Favorites
152    public const int FAVORITES = 99;
153
154    // Dan Solve Achievements
155    // Single solve
156    public const int SOLVE_1D = 101;
157    public const int SOLVE_2D = 102;
158    public const int SOLVE_3D = 103;
159    public const int SOLVE_4D = 104;
160    public const int SOLVE_5D = 105;
161    // Multiple solves
162    public const int SOLVE_10_1D = 106;
163    public const int SOLVE_10_2D = 107;
164    public const int SOLVE_10_3D = 108;
165    public const int SOLVE_10_4D = 109;
166    public const int SOLVE_10_5D = 110;
167
168    // Gem Achievements
169    public const int EMERALD = 111;
170    public const int SAPPHIRE = 112;
171    public const int RUBY = 113;
172    public const int DIAMOND = 114;
173
174    public const int COUNT = 115;
175}