Skip to content

Commit 2cde70a

Browse files
committed
feat(plugin): implement ScoreDefinition
1 parent bdc978f commit 2cde70a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

plugin/src/server/sc/plugin2021/GamePlugin.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ import sc.api.plugins.IGamePlugin
55
import sc.api.plugins.host.IGamePluginHost
66
import sc.plugin2021.util.Configuration.classesToRegister
77
import sc.plugins.PluginDescriptor
8+
import sc.shared.ScoreAggregation
89
import sc.shared.ScoreDefinition
10+
import sc.shared.ScoreFragment
911

1012
@PluginDescriptor(name = "Blokus", uuid = "swc_2021_blokus", author = "")
1113
class GamePlugin: IGamePlugin {
1214

1315
companion object {
1416
val PLUGIN_AUTHOR = ""
1517
val PLUGIN_UUID = "swc_2021_blokus"
18+
19+
val SCORE_DEFINITION = ScoreDefinition().apply {
20+
add("Gewinner")
21+
add(ScoreFragment("\u2205 belegte Felder", ScoreAggregation.AVERAGE))
22+
}
1623
}
1724

1825
override fun createGame(): IGameInstance {
@@ -27,8 +34,5 @@ class GamePlugin: IGamePlugin {
2734
TODO("Not yet implemented")
2835
}
2936

30-
override fun getScoreDefinition(): ScoreDefinition {
31-
TODO("Not yet implemented")
32-
}
33-
37+
override fun getScoreDefinition(): ScoreDefinition = SCORE_DEFINITION
3438
}

0 commit comments

Comments
 (0)