From 8bd72d9f13baf9be1213c491be7a3805fb66b624 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Thu, 28 May 2020 14:12:50 +0200 Subject: Fix endless copy-guild loop --- sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw-engine/src') 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, 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 -- cgit