internal static void PrepareMarket(GameEntity niche, long startCapital, GameContext gameContext)
        {
            var segments = Marketing.GetAudienceInfos();

            // spawn competitors
            for (var i = 0; i < 5; i++)
            {
                var funds = Random.Range(20, 50) * startCapital;
                var c     = Markets.SpawnCompany(niche, gameContext, funds);

                var features = Products.GetAllFeaturesForProduct();
                var teams    = Random.Range(3, 9);

                for (var j = 0; j < teams; j++)
                {
                    Teams.AddTeam(c, gameContext, TeamType.CrossfunctionalTeam);
                }

                foreach (var f in features)
                {
                    if (f.FeatureBonus.isRetentionFeature)
                    {
                        Products.ForceUpgradeFeature(c, f.Name, Random.Range(2f, 5f), gameContext);
                    }
                }

                var clients = 50_000d * Mathf.Pow(10, Random.Range(0.87f, 2.9f)) * (i + 1);

                //var positioning = c.productPositioning.Positioning;
                foreach (var s in segments)
                {
                    if (s.ID == Marketing.GetCoreAudienceId(c))
                    {
                        var audience = System.Convert.ToInt64(clients * Random.Range(0.1f, 0.5f));
                        Marketing.AddClients(c, audience);
                    }
                }
            }

            // spawn investors
            for (var i = 0; i < C.AMOUNT_OF_INVESTORS_ON_STARTING_NICHE; i++)
            {
                var fund = Companies.GenerateInvestmentFund(gameContext, RandomUtils.GenerateInvestmentCompanyName(), 500000);
                Companies.AddFocusNiche(fund, niche.niche.NicheType, gameContext);
            }
        }
        public static long GetProductPotential(GameEntity company)
        {
            // judge by potential
            var segmentId = Marketing.GetCoreAudienceId(company);
            var segment   = Marketing.GetAudienceInfos()[segmentId];

            var income = GetBaseIncomeByMonetizationType(company);

            var incomeMultiplier = income * segment.Bonuses.Where(b => b.isMonetisationFeature).Select(b => b.Max).Sum();



            long baseCost = 1_000_000;

            return((long)((double)baseCost * (100f + incomeMultiplier) / 100f));

            var max                 = segment.Size;
            var possiblePortion     = 5;
            var potentialBaseIncome = income * (100f + incomeMultiplier) / 100f;

            return(GetCompanyIncomeBasedCost((long)(potentialBaseIncome * (double)max) * possiblePortion / 1000));
        }