File tree Expand file tree Collapse file tree 1 file changed +71
-12
lines changed
src/main/kotlin/com/github/ilovegamecoding/intellijcodexp/model Expand file tree Collapse file tree 1 file changed +71
-12
lines changed Original file line number Diff line number Diff line change 1
1
package com.github.ilovegamecoding.intellijcodexp.model
2
2
3
- data class CodeXPChallenge (
4
- val id : String ,
5
- val name : String ,
6
- val category : Type ,
7
- val description : String ,
8
- val xp : Long ,
9
- val goal : Long ,
10
- var isCompleted : Boolean ,
11
- val onCompletion : () -> Unit
12
- ) {
3
+ /* *
4
+ * CodeXPChallenge class
5
+ * CodeXPChallenge is a class that represents a challenge. Challenges are used to track the progress of the user.
6
+ *
7
+ * @constructor Create empty CodeXPChallenge.
8
+ */
9
+ class CodeXPChallenge () {
10
+ /* *
11
+ * Type of challenge.
12
+ */
13
+ var type: Int = - 1
14
+
15
+ /* *
16
+ * Name of challenge.
17
+ */
18
+ var name: String = " "
19
+
20
+ /* *
21
+ * Description of challenge.
22
+ */
23
+ var description: String = " "
24
+
25
+ /* *
26
+ * Reward XP of challenge when completed.
27
+ */
28
+ var rewardXP: Long = 0L
29
+
30
+ /* *
31
+ * Current value of challenge.
32
+ */
33
+ var value: Long = 0L
34
+
35
+ /* *
36
+ * Goal of challenge.
37
+ */
38
+ var goal: Long = 0L
39
+
40
+ /* *
41
+ * Constructor for CodeXPChallenge with all parameters.
42
+ */
43
+ constructor (
44
+ type: Int ,
45
+ name: String ,
46
+ description: String ,
47
+ rewardXP: Long ,
48
+ value: Long ,
49
+ goal: Long
50
+ ) : this () {
51
+ this .type = type
52
+ this .name = name
53
+ this .description = description
54
+ this .rewardXP = rewardXP
55
+ this .value = value
56
+ this .goal = goal
57
+ }
58
+
59
+ /* *
60
+ * Type of challenge.
61
+ *
62
+ * !! Do not ever change the order of the enum values. If you want to add a new challenge type, add it to the end of the enum !!
63
+ */
13
64
enum class Type {
14
- XP ,
15
- ACTION
65
+ TOTAL_XP ,
66
+ ACTION_COUNT ,
67
+ BUILD_COUNT ,
68
+ DEBUG_COUNT ,
69
+ RUN_COUNT ,
70
+ COMMIT_COUNT ,
71
+ PUSH_COUNT ,
72
+ MERGE_COUNT ,
73
+ PULL_COUNT ,
74
+ TYPING_COUNT ,
16
75
}
17
76
}
You can’t perform that action at this time.
0 commit comments