ConsoleLauncher accepts arbitrary amount of civs to simulate - see #12407

This commit is contained in:
yairm210 2024-11-07 12:37:29 +02:00
parent c5cab907c1
commit aa59be298b

View File

@ -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<Player>().apply {
add(Player(civilization1))
add(Player(civilization2))
civilizations.forEach { add(Player(it)) }
add(Player(Constants.spectator, PlayerType.Human))
}
}