From aa59be298beafdd62809a0a7feaa12bc2feee946 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Thu, 7 Nov 2024 12:37:29 +0200 Subject: [PATCH] ConsoleLauncher accepts arbitrary amount of civs to simulate - see #12407 --- desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt b/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt index 0ea2383d0e..52969fd390 100644 --- a/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt +++ b/desktop/src/com/unciv/app/desktop/ConsoleLauncher.kt @@ -71,15 +71,14 @@ internal object ConsoleLauncher { } } - private fun getGameParameters(civilization1: String, civilization2: String): GameParameters { + private fun getGameParameters(vararg civilizations: String): GameParameters { return GameParameters().apply { difficulty = "Prince" numberOfCityStates = 0 speed = Speed.DEFAULT noBarbarians = true players = ArrayList().apply { - add(Player(civilization1)) - add(Player(civilization2)) + civilizations.forEach { add(Player(it)) } add(Player(Constants.spectator, PlayerType.Human)) } }