mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Don't give simulation stats for civs that never won
This commit is contained in:
@ -108,8 +108,10 @@ class Simulation(
|
|||||||
fun text(): String {
|
fun text(): String {
|
||||||
var outString = ""
|
var outString = ""
|
||||||
for (civ in civilizations) {
|
for (civ in civilizations) {
|
||||||
|
|
||||||
outString += "\n$civ:\n"
|
outString += "\n$civ:\n"
|
||||||
val wins = winRate[civ]!!.value * 100 / max(steps.size, 1)
|
val wins = winRate[civ]!!.value * 100 / max(steps.size, 1)
|
||||||
|
if (wins == 0) continue
|
||||||
outString += "$wins% total win rate \n"
|
outString += "$wins% total win rate \n"
|
||||||
for (victory in UncivGame.Current.gameInfo!!.ruleset.victories.keys) {
|
for (victory in UncivGame.Current.gameInfo!!.ruleset.victories.keys) {
|
||||||
val winsVictory = winRateByVictory[civ]!![victory]!!.value * 100 / max(winRate[civ]!!.value, 1)
|
val winsVictory = winRateByVictory[civ]!![victory]!!.value * 100 / max(winRate[civ]!!.value, 1)
|
||||||
|
Reference in New Issue
Block a user