Skip to content

Commit 592f15d

Browse files
anarchuserxeruf
authored andcommitted
refactor(sdk): convert score-related enums to kotlin
1 parent 9fe7c50 commit 592f15d

File tree

4 files changed

+36
-36
lines changed

4 files changed

+36
-36
lines changed

socha-sdk/src/framework/sc/shared/ScoreAggregation.java

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package sc.shared
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias
4+
5+
@XStreamAlias(value = "scoreAggregation")
6+
enum class ScoreAggregation {
7+
/** All values from all games should be summed up. */
8+
SUM,
9+
10+
/** All values from all games should be averaged. */
11+
AVERAGE
12+
}

socha-sdk/src/framework/sc/shared/ScoreCause.java

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package sc.shared
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias
4+
5+
@XStreamAlias(value = "scoreCause")
6+
enum class ScoreCause {
7+
/** The player didn't violate against the rules or left the game early. */
8+
REGULAR,
9+
10+
/** The player left the game early (connection loss). */
11+
LEFT,
12+
13+
/** The player violated against the games rules. */
14+
RULE_VIOLATION,
15+
16+
/** The player took to long to respond to the move request. */
17+
SOFT_TIMEOUT,
18+
19+
/** The player didn't respond to the move request. */
20+
HARD_TIMEOUT,
21+
22+
/** An error occurred during communication. This could indicate a bug in the server's code. */
23+
UNKNOWN
24+
}

0 commit comments

Comments
 (0)