Simulation

class Simulation(newGameInfo: GameInfo, simulationsPerThread: Int, threadsNumber: Int, maxTurns: Int)

Functions

add
Link copied to clipboard
fun add(step: SimulationStep, threadId: Int = 1)
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getStats
Link copied to clipboard
fun getStats()
hashCode
Link copied to clipboard
open fun hashCode(): Int
printDraw
Link copied to clipboard
private fun printDraw(step: SimulationStep)
printWinner
Link copied to clipboard
private fun printWinner(step: SimulationStep)
start
Link copied to clipboard
fun start()
toString
Link copied to clipboard
open override fun toString(): String
updateCounter
Link copied to clipboard
fun updateCounter(threadId: Int = 1)

Properties

avgDuration
Link copied to clipboard
private var avgDuration: Duration
avgSpeed
Link copied to clipboard
private var avgSpeed: Float = 0f
civilizations
Link copied to clipboard
val civilizations: List<String>
endTime
Link copied to clipboard
private var endTime: Long = 0
maxSimulations
Link copied to clipboard
private val maxSimulations: Int
maxTurns
Link copied to clipboard
private val maxTurns: Int = 1000
newGameInfo
Link copied to clipboard
private val newGameInfo: GameInfo
simulationsPerThread
Link copied to clipboard
val simulationsPerThread: Int = 5
startTime
Link copied to clipboard
private var startTime: Long = 0
stepCounter
Link copied to clipboard
private var stepCounter: Int = 0
steps
Link copied to clipboard
var steps: ArrayList<SimulationStep>
threadsNumber
Link copied to clipboard
private val threadsNumber: Int = 1
totalDuration
Link copied to clipboard
private var totalDuration: Duration
totalTurns
Link copied to clipboard
private var totalTurns: Int = 0
winRate
Link copied to clipboard
var winRate: MutableMap<String, MutableInt>
winRateByVictory
Link copied to clipboard
private var winRateByVictory: HashMap<String, MutableMap<VictoryType, MutableInt>>

Sources

jvm source
Link copied to clipboard