Skip to content

Commit c63c690

Browse files
committed
fix(plugin): only end game at even turns
So both players have equal moves if the first one finishes.
1 parent 6a9073b commit c63c690

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/kotlin/sc/plugin2022/GameState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ data class GameState @JvmOverloads constructor(
4949
}
5050

5151
val isOver
52-
get() = round > Constants.ROUND_LIMIT || ambers.any { it.value >= 2 }
52+
get() = round > Constants.ROUND_LIMIT || (ambers.any { it.value >= 2 } && turn % 2 == 0)
5353

5454
/** Berechne die Punkteanzahl für das gegebene Team. */
5555
override fun getPointsForTeam(team: ITeam): Int =

0 commit comments

Comments
 (0)