public void ComputeNewStock(ExternalMarket externalMarket)
        {
            foreach (ResourceType resourceType in ResourceTypes.resourceTypes)
            {
                ComputeResourceRatio(resourceType, out double supplyAmount, out double demandAmount);
                ComputeExternalTrade(resourceType, externalMarket);
            }
            externalMarket.UpdateTrade(Supply);

            foreach (ResourceType resourceType in ResourceTypes.resourceTypes)
            {
                MergeDublicates(resourceType);

                ComputeResourceRatio(resourceType, out double supplyAmount, out double demandAmount);
            }
        }
Example #2
0
        public void ComputeNewStock(ExternalMarket externalMarket)
        {
            foreach (ResourceTypes.ResourceType resourceType in ResourceTypes.GetIterator())
            {
                ComputeResourceRatio(resourceType);
                externalMarket.ComputeExternalTrade(GetExternalSupply(resourceType), Demand.GetAmount(resourceType), resourceType, GetSupplyToDemandRatio(resourceType).GetSupplyToDemandRatio(), this);
            }
            externalMarket.UpdateTrade(ExternalSupply);

            foreach (ResourceTypes.ResourceType resourceType in ResourceTypes.GetIterator())
            {
                MergeDublicates(GetSupply(resourceType));
                MergeDublicates(GetExternalSupply(resourceType));
                ComputeResourceRatio(resourceType);
            }
        }