summaryrefslogtreecommitdiff
path: root/sw-engine
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-28 14:12:50 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-28 14:34:31 +0200
commit8bd72d9f13baf9be1213c491be7a3805fb66b624 (patch)
tree3ddec52fcba71124c1cecfba4acf8fbbf0bcbce7 /sw-engine
parentFix production alternative duplicates (diff)
downloadseven-wonders-8bd72d9f13baf9be1213c491be7a3805fb66b624.tar.gz
seven-wonders-8bd72d9f13baf9be1213c491be7a3805fb66b624.tar.bz2
seven-wonders-8bd72d9f13baf9be1213c491be7a3805fb66b624.zip
Fix endless copy-guild loop
Diffstat (limited to 'sw-engine')
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt2
1 files changed, 1 insertions, 1 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 b9daf53f..da3ae5c7 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
@@ -97,7 +97,7 @@ class Game internal constructor(
private fun determineAction(hand: List<HandCard>, board: Board): Action = when {
endOfGameReached() -> when {
- board.hasSpecial(SpecialAbility.COPY_GUILD) -> determineCopyGuildAction(board)
+ board.hasSpecial(SpecialAbility.COPY_GUILD) && board.copiedGuild == null -> determineCopyGuildAction(board)
else -> Action.WAIT
}
hand.size == 1 && board.hasSpecial(SpecialAbility.PLAY_LAST_CARD) -> Action.PLAY_LAST
bgstack15