From 4c62a6444d1742a08ed1a138809892b1c98683c2 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Fri, 18 Sep 2020 09:38:28 +0200 Subject: Add comment to explain fix --- sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw-engine/src/main') 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 1d4fab65..78d09b35 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 @@ -199,6 +199,8 @@ class Game internal constructor( private fun endOfAgeReached(): Boolean = hands.isEmpty private fun executeEndOfAgeEvents() { + // this is necessary because this method is actually called twice in the 3rd age if someone has CPY_GUILD + // TODO we should instead manage the game's state machine in a better way to avoid stuff like this if (!militaryConflictsResolved) { table.resolveMilitaryConflicts() militaryConflictsResolved = true -- cgit