From 269691a6cea773ffe057ca76636f6260fa3aae6a Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Mon, 4 Jul 2022 19:15:40 -0400 Subject: [PATCH] Change fleet generation --- .../kotlin/net/starshipfights/campaign/cluster_test.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() -- 2.25.1