From 8f1873732a53514c83225f42248c9c28cbbeab17 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 26 Jun 2024 11:32:53 +0300 Subject: [PATCH] release: v25.0.4 --- CHANGELOG.md | 4 ++++ gradle.properties | 2 +- plugin/src/main/kotlin/sc/plugin2023/GameState.kt | 4 ++++ server/src/test/java/sc/server/plugins/TestGameState.kt | 8 ++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8836b8fe..8fc55a7e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The version should always be in sync with the [GUI](https://github.com/software- A `y` version of 0 marks the beta of the current year and likely contains breaking changes between patches. +### 25.0.4 Allow Follow-up Move - 2024-06-26 +- Always finish the round even if one player is already in the goal +- Emit proper GameResult when game ends regularly through implementing WinCondition + ### 25.0.3 Auxiliaries - 2024-06-25 - revamp a few internal helper methods - fix GameResult diff --git a/gradle.properties b/gradle.properties index 9c6838a59..1fcc094c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ socha.gameName=hui socha.version.year=25 socha.version.minor=00 -socha.version.patch=03 +socha.version.patch=04 socha.version.suffix= \ No newline at end of file diff --git a/plugin/src/main/kotlin/sc/plugin2023/GameState.kt b/plugin/src/main/kotlin/sc/plugin2023/GameState.kt index e7032f4f1..dadfb499b 100644 --- a/plugin/src/main/kotlin/sc/plugin2023/GameState.kt +++ b/plugin/src/main/kotlin/sc/plugin2023/GameState.kt @@ -7,6 +7,7 @@ import sc.plugin2023.util.PenguinsMoveMistake import sc.plugin2023.util.PenguinConstants import sc.shared.InvalidMoveException import sc.shared.MoveMistake +import sc.shared.WinCondition /** * Der aktuelle Spielstand. @@ -81,6 +82,9 @@ data class GameState @JvmOverloads constructor( override val isOver: Boolean get() = immovable() + override val winCondition: WinCondition? + get() = TODO("Not yet implemented") + /** Berechne die Punkteanzahl für das gegebene Team. */ override fun getPointsForTeam(team: ITeam): IntArray = intArrayOf(fishes[team.index]) diff --git a/server/src/test/java/sc/server/plugins/TestGameState.kt b/server/src/test/java/sc/server/plugins/TestGameState.kt index 353a74121..0f5d600b5 100644 --- a/server/src/test/java/sc/server/plugins/TestGameState.kt +++ b/server/src/test/java/sc/server/plugins/TestGameState.kt @@ -5,6 +5,7 @@ import sc.api.plugins.IMove import sc.api.plugins.ITeam import sc.api.plugins.Team import sc.framework.plugins.Player +import sc.shared.WinCondition data class TestGameState( override var turn: Int = 0, @@ -14,8 +15,11 @@ data class TestGameState( override val currentTeam: Team get() = Team.values()[turn % Team.values().size] - @Transient - override val isOver = false + override val isOver + get() = false + + override val winCondition: WinCondition? + get() = null override fun getPointsForTeam(team: ITeam): IntArray = intArrayOf(team.index, turn)