Skip to content

Commit 6344283

Browse files
committed
feat: Add challenge id, reward xp increment, goal increment member variables
1 parent 8f4f984 commit 6344283

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/main/kotlin/com/github/ilovegamecoding/intellijcodexp/model/CodeXPChallenge.kt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package com.github.ilovegamecoding.intellijcodexp.model
22

33
import com.github.ilovegamecoding.intellijcodexp.services.CodeXPService
4+
import java.util.*
45

56
/**
67
* CodeXPChallenge class
78
*
89
* CodeXPChallenge is a class that represents a challenge. Challenges are used to track the progress of the user.
910
*/
1011
class CodeXPChallenge() {
12+
/**
13+
* ID of challenge.
14+
*/
15+
var id: String = ""
16+
1117
/**
1218
* Event of challenge.
1319
*/
@@ -28,6 +34,11 @@ class CodeXPChallenge() {
2834
*/
2935
var rewardXP: Long = 0L
3036

37+
/**
38+
* Increment of reward XP of challenge when completed.
39+
*/
40+
var rewardXPIncrement: Long = 0L
41+
3142
/**
3243
* Current progress of challenge.
3344
*/
@@ -38,6 +49,11 @@ class CodeXPChallenge() {
3849
*/
3950
var goal: Long = 0L
4051

52+
/**
53+
* Increment of goal of challenge.
54+
*/
55+
var goalIncrement: Long = 0L
56+
4157
/**
4258
* Constructor for CodeXPChallenge with all parameters.
4359
*/
@@ -46,14 +62,19 @@ class CodeXPChallenge() {
4662
name: String,
4763
description: String,
4864
rewardXP: Long,
65+
rewardXPIncrement: Long,
4966
progress: Long,
50-
goal: Long
67+
goal: Long,
68+
goalIncrement: Long
5169
) : this() {
70+
this.id = UUID.randomUUID().toString()
5271
this.event = event
5372
this.name = name
5473
this.description = description
5574
this.rewardXP = rewardXP
75+
this.rewardXPIncrement = rewardXPIncrement
5676
this.progress = progress
5777
this.goal = goal
78+
this.goalIncrement = goalIncrement
5879
}
5980
}

0 commit comments

Comments
 (0)