@@ -26,11 +26,12 @@ pub enum ChallengeCategory {
2626#[ derive( Copy , Clone , PartialEq , Eq , Hash , VariantArray , IntoStaticStr , EnumString , Debug ) ]
2727pub enum AchievementType {
2828 // Solve Related
29- // OnePoint,
29+ OnePoint ,
3030 UncontestedFirstPlace ,
3131 FirstPlace ,
3232 OnlySolution ,
3333 UncontestedFirstPlacePostMortem ,
34+ TenTopTen ,
3435 // FiveLanguages,
3536 // ImproveFirstPlace,
3637 FirstDaySolve ,
@@ -84,6 +85,8 @@ pub enum AchievementType {
8485impl AchievementType {
8586 pub fn get_achievement_name ( self ) -> & ' static str {
8687 match self {
88+ AchievementType :: OnePoint => "Consolation Prize" ,
89+ AchievementType :: TenTopTen => "Ten times Ten" ,
8790 AchievementType :: CodeGolf1Point => "Code Golf Baby" ,
8891 AchievementType :: CodeGolf250Point => "Code Golf Newbie" ,
8992 AchievementType :: CodeGolf500Point => "Code Golf Starter" ,
@@ -138,7 +141,9 @@ impl AchievementType {
138141 | AchievementType :: UncontestedFirstPlace
139142 | AchievementType :: SolveBeta
140143 | AchievementType :: SolvePostMortem
141- | AchievementType :: UncontestedFirstPlacePostMortem => AchievementCategory :: SolveRelated ,
144+ | AchievementType :: UncontestedFirstPlacePostMortem
145+ | AchievementType :: OnePoint
146+ | AchievementType :: TenTopTen => AchievementCategory :: SolveRelated ,
142147 AchievementType :: ImproveExample
143148 | AchievementType :: ImproveJudge
144149 | AchievementType :: ImproveDescription
@@ -150,7 +155,12 @@ impl AchievementType {
150155
151156 pub fn get_associated_number ( self ) -> Option < i32 > {
152157 match self {
153- Self :: CodeGolf1Point | Self :: RestrictedSource1Point => Some ( 1 ) ,
158+ Self :: CodeGolf1Point
159+ | Self :: RestrictedSource1Point
160+ | Self :: Vote
161+ | Self :: OnePoint
162+ | Self :: OnlySolution => Some ( 1 ) ,
163+ Self :: TenTopTen => Some ( 10 ) ,
154164 Self :: CodeGolf250Point | Self :: RestrictedSource250Point => Some ( 250 ) ,
155165 Self :: CodeGolf500Point | Self :: RestrictedSource500Point => Some ( 500 ) ,
156166 Self :: CodeGolf1000Point
@@ -162,6 +172,7 @@ impl AchievementType {
162172 | Self :: JavaScript1000Point
163173 | Self :: Rust1000Point => Some ( 1000 ) ,
164174 Self :: CodeGolf2000Point | Self :: RestrictedSource2000Point => Some ( 2000 ) ,
175+ Self :: FirstDaySolve | Self :: LastDaySolve => Some ( 24 ) ,
165176
166177 AchievementType :: JavaScript3500Point => Some ( 3500 ) ,
167178 _ => None ,
@@ -170,7 +181,9 @@ impl AchievementType {
170181
171182 pub fn get_achievement_description ( self ) -> & ' static str {
172183 match self {
173- AchievementType :: OnlySolution => "Be the first to solve a challenge in a language" ,
184+ AchievementType :: OnePoint => "Earn just one score for a solution" ,
185+ AchievementType :: TenTopTen => "Earn top 10% in 10 different challenges" ,
186+ AchievementType :: OnlySolution => "Be the first to solve a heist in a language" ,
174187 AchievementType :: UncontestedFirstPlace => "Beat the best score" ,
175188 AchievementType :: CodeGolf1Point => "Earn your first point in Code Golf" ,
176189 AchievementType :: CodeGolf250Point => "Earn 250 points in Code Golf" ,
@@ -190,27 +203,23 @@ impl AchievementType {
190203 AchievementType :: C1000Point => "Earn 1,000 points in C" ,
191204 AchievementType :: Apl1000Point => "Earn 1,000 points in APL" ,
192205 AchievementType :: StarTheRepo => "Star the Byte Heist Github Repo" ,
193- AchievementType :: FirstDaySolve => {
194- "Solve a challenge within 24 hours of when it goes live"
195- }
196- AchievementType :: LastDaySolve => "Solve a challenge less than 24 hours before it ends" ,
197- AchievementType :: SolveBeta => "Solve a beta challenge" ,
198- AchievementType :: SolvePostMortem => "Solve a challenge after it ends" ,
206+ AchievementType :: FirstDaySolve => "Solve a heist within 24 hours of when it goes live" ,
207+ AchievementType :: LastDaySolve => "Solve a heist less than 24 hours before it ends" ,
208+ AchievementType :: SolveBeta => "Solve a beta heist" ,
209+ AchievementType :: SolvePostMortem => "Solve a heist after it ends" ,
199210 AchievementType :: UncontestedFirstPlacePostMortem => {
200- "Beat the best score after the challenge has ended"
211+ "Beat the best score after the heist has ended"
201212 }
202213 AchievementType :: Contribute => "Contribute to Byte Heist" ,
203- AchievementType :: FirstPlace => {
204- "Get first place on a challenge, even if just for a moment"
205- }
214+ AchievementType :: FirstPlace => "Get first place on a heist, even if just for a moment" ,
206215 AchievementType :: ImproveDescription => {
207- "Submit a change suggestion that updates a challenge 's description and is accepted"
216+ "Submit a change suggestion that updates a heist 's description and is accepted"
208217 }
209218 AchievementType :: ImproveExample => {
210- "Submit a change suggestion that updates a challenge 's example code and is accepted"
219+ "Submit a change suggestion that updates a heist 's example code and is accepted"
211220 }
212221 AchievementType :: ImproveJudge => {
213- "Submit a change suggestion that updates a challenge 's judge and is accepted"
222+ "Submit a change suggestion that updates a heist 's judge and is accepted"
214223 }
215224 AchievementType :: ChangeSuggestionInvalidates1 => {
216225 "Submit a change suggestion that invalidates a solution"
@@ -247,7 +256,6 @@ impl AchievementType {
247256 | AchievementType :: RestrictedSource500Point => {
248257 Some ( ChallengeCategory :: RestrictedSource )
249258 }
250-
251259 _ => None ,
252260 }
253261 }
0 commit comments