summaryrefslogtreecommitdiff
path: root/sw-engine/src
diff options
context:
space:
mode:
Diffstat (limited to 'sw-engine/src')
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt12
1 files changed, 5 insertions, 7 deletions
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
index da3ae5c7..34a8dd99 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
@@ -149,7 +149,9 @@ class Game internal constructor(
*/
fun playTurn(): TableState {
makeMoves()
- if (endOfAgeReached()) {
+ if (shouldStartPlayDiscardedTurn()) {
+ startPlayDiscardedTurn()
+ } else if (endOfAgeReached()) {
executeEndOfAgeEvents()
if (endOfGameReached()) {
startEndGameTurn()
@@ -157,12 +159,8 @@ class Game internal constructor(
startNewAge()
}
} else {
- if (shouldStartPlayDiscardedTurn()) {
- startPlayDiscardedTurn()
- } else {
- rotateHandsIfRelevant()
- startNewTurn()
- }
+ rotateHandsIfRelevant()
+ startNewTurn()
}
return table.toTableState()
}
bgstack15