FINALLY got ConsoleLauncher returning actual simulation results!!

This commit is contained in:
yairm210
2024-06-30 23:36:46 +03:00
parent 36c7f0b2d9
commit 3dbedf04ba
2 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class Simulation(
val simulationsPerThread: Int = 1
,
private val threadsNumber: Int = 1,
private val maxTurns: Int = 1000
private val maxTurns: Int = 500
) {
private val maxSimulations = threadsNumber * simulationsPerThread
val civilizations = newGameInfo.civilizations.filter { it.civName != Constants.spectator }.map { it.civName }

View File

@ -41,8 +41,10 @@ internal object ConsoleLauncher {
val mapParameters = getMapParameters()
val gameSetupInfo = GameSetupInfo(gameParameters, mapParameters)
val newGame = GameStarter.startNewGame(gameSetupInfo)
newGame.gameParameters.victoryTypes = ArrayList(newGame.ruleset.victories.keys)
UncivGame.Current.gameInfo = newGame
val simulation = Simulation(newGame,10,4)
simulation.start()