Skip to content

Commit

Permalink
release: v25.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Jun 26, 2024
1 parent 6adbccb commit 8f18737
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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=
4 changes: 4 additions & 0 deletions plugin/src/main/kotlin/sc/plugin2023/GameState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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])
Expand Down
8 changes: 6 additions & 2 deletions server/src/test/java/sc/server/plugins/TestGameState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 8f18737

Please sign in to comment.