From: TheSaminator Date: Mon, 4 Jul 2022 23:15:40 +0000 (-0400) Subject: Change fleet generation X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=269691a6cea773ffe057ca76636f6260fa3aae6a;p=starship-fights Change fleet generation --- diff --git a/src/jvmMain/kotlin/net/starshipfights/campaign/cluster_test.kt b/src/jvmMain/kotlin/net/starshipfights/campaign/cluster_test.kt index 252c6b9..5eb7bcb 100644 --- a/src/jvmMain/kotlin/net/starshipfights/campaign/cluster_test.kt +++ b/src/jvmMain/kotlin/net/starshipfights/campaign/cluster_test.kt @@ -20,7 +20,10 @@ fun StarClusterView.testPostProcess(): StarClusterView { val ownedSystems = (systems.toList().shuffled() zip ownerFlavors).associate { (systemWithId, flavor) -> val (systemId, system) = systemWithId - val numOfFleets = (0..2).random() + (0..2).random() + 1 + val numOfFleets = (0..1).random() + (0..1).random() + (0..1).random() + if (numOfFleets == 0) + return@associate systemId to system + val fleets = (1..numOfFleets).associate { _ -> val admiralRank = AdmiralRank.values().random() val admiralIsFemale = flavor == FactionFlavor.FELINAE_FELICES || Random.nextBoolean()