コード例 #1
0
        public static IEnumerable <ChannelInfo> GetAffordableMarketingChannels(GameEntity product, GameContext gameContext)
        {
            var payer   = product.isFlagship ? Companies.GetPlayerCompany(gameContext) : product;
            int periods = product.isFlagship ? 4 : 1;

            var spareBudget = Economy.GetSpareBudget(payer, gameContext, periods);

            return(GetTheoreticallyPossibleMarketingChannels(product)
                   .Where(IsCanAffordChannel(product, spareBudget)));
        }