mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-03 13:30:51 +07:00
Simulation civ names are constants, so we can reference them from wherever inside the code for A/B testing
This commit is contained in:
parent
e397c52f4c
commit
fba4128c02
@ -88,6 +88,9 @@ object Constants {
|
|||||||
|
|
||||||
const val uniqueOrDelimiter = "\" OR \""
|
const val uniqueOrDelimiter = "\" OR \""
|
||||||
|
|
||||||
|
const val simulationCiv1 = "SimulationCiv1"
|
||||||
|
const val simulationCiv2 = "SimulationCiv2"
|
||||||
|
|
||||||
const val dropboxMultiplayerServer = "Dropbox"
|
const val dropboxMultiplayerServer = "Dropbox"
|
||||||
const val uncivXyzServer = "https://uncivserver.xyz"
|
const val uncivXyzServer = "https://uncivserver.xyz"
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.unciv.app.desktop
|
package com.unciv.app.desktop
|
||||||
|
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
|
import com.unciv.Constants.simulationCiv1
|
||||||
|
import com.unciv.Constants.simulationCiv2
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
import com.unciv.logic.GameStarter
|
import com.unciv.logic.GameStarter
|
||||||
import com.unciv.logic.civilization.PlayerType
|
import com.unciv.logic.civilization.PlayerType
|
||||||
@ -18,6 +20,7 @@ import java.util.LinkedHashSet
|
|||||||
import kotlin.time.ExperimentalTime
|
import kotlin.time.ExperimentalTime
|
||||||
|
|
||||||
internal object ConsoleLauncher {
|
internal object ConsoleLauncher {
|
||||||
|
|
||||||
// To run,set working directory to android/assets in run configuration
|
// To run,set working directory to android/assets in run configuration
|
||||||
@ExperimentalTime
|
@ExperimentalTime
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@ -38,10 +41,10 @@ internal object ConsoleLauncher {
|
|||||||
|
|
||||||
val ruleset = RulesetCache[BaseRuleset.Civ_V_GnK.fullName]!!
|
val ruleset = RulesetCache[BaseRuleset.Civ_V_GnK.fullName]!!
|
||||||
|
|
||||||
ruleset.nations["GenericCiv1"] = Nation().apply { name = "GenericCiv1" }
|
ruleset.nations[simulationCiv1] = Nation().apply { name = simulationCiv1 }
|
||||||
ruleset.nations["GenericCiv2"] = Nation().apply { name = "GenericCiv2" }
|
ruleset.nations[simulationCiv2] = Nation().apply { name = simulationCiv2 }
|
||||||
|
|
||||||
val gameParameters = getGameParameters("GenericCiv1", "GenericCiv2")
|
val gameParameters = getGameParameters(simulationCiv1, simulationCiv2)
|
||||||
val mapParameters = getMapParameters()
|
val mapParameters = getMapParameters()
|
||||||
val gameSetupInfo = GameSetupInfo(gameParameters, mapParameters)
|
val gameSetupInfo = GameSetupInfo(gameParameters, mapParameters)
|
||||||
val newGame = GameStarter.startNewGame(gameSetupInfo)
|
val newGame = GameStarter.startNewGame(gameSetupInfo)
|
||||||
|
Loading…
Reference in New Issue
Block a user