Exemplo n.º 1
0
        private ConstructionOrders updateConstructionPlans(StaticsDB statics, ConstructionOrders oldOrders, AConstructionSiteProcessor processor, IDictionary <string, double> playersVars)
        {
            var newOrders = new ConstructionOrders(oldOrders.SpendingRatio);
            var vars      = processor.LocalEffects(statics).UnionWith(playersVars).Get;

            foreach (var item in oldOrders.Queue)
            {
                if (item.Condition.Evaluate(vars) >= 0)
                {
                    newOrders.Queue.Add(item);
                }
            }

            return(newOrders);
        }
 protected AConstructionSiteProcessor(AConstructionSiteProcessor original)
 {
     this.Production             = original.Production;
     this.SpendingPlan           = new List <ConstructionResult>(original.SpendingPlan);
     this.SpendingRatioEffective = original.SpendingRatioEffective;
 }