Exemplo n.º 1
0
 public EconomicAttributes(Tangible Tangible, double LivingStandard)
 {
     _Supply          = 0;
     _Demand          = 0;
     _Coefficient     = Tangible.Coefficient;
     _Exponent        = Tangible.Exponent;
     _LivingStandard  = LivingStandard;
     _Decay           = Tangible.Decay;
     _IncomeReduction = 0;
 }
Exemplo n.º 2
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public double SupplyPrice(Tangible Tangible, double Amount)
 {
     if (_Market.ContainsKey(Tangible))
     {
         return(_Market[Tangible].SupplyPrice(Amount, _Population));
     }
     else
     {
         return(Double.PositiveInfinity);
     }
 }
Exemplo n.º 3
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 private void AddTangibleIfNotExists(Tangible Tangible)
 {
     if (!_Market.ContainsKey(Tangible))
     {
         if (Tangible is Resource)
         {
             _Market.Add(Tangible, new DepositAttributes(Tangible.Coefficient, Tangible.Exponent, Tangible.Decay, 0, 0, _LivingStandard));
         }
         else
         {
             _Market.Add(Tangible, new EconomicAttributes(Tangible.Coefficient, Tangible.Exponent, Tangible.Decay, 0, 0, _LivingStandard));
         }
     }
 }
Exemplo n.º 4
0
 public void AddTangible(string Name, Tangible Tangible)
 {
     _Tangibles.Add(Name.ToLower(), Tangible);
 }
Exemplo n.º 5
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public double FlowFrom(Tangible Tangible)
 {
     return(this[Tangible].Price(_Population) * this[Tangible].Supply);
 }
Exemplo n.º 6
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public double Price(Tangible Tangible)
 {
     return(this[Tangible].Price(_Population));
 }
Exemplo n.º 7
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public EconomicAttributes this[Tangible Tangible] {
     get { AddTangibleIfNotExists(Tangible); return(_Market[Tangible]); }
 }
Exemplo n.º 8
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public void ChangeIncomeReduction(Tangible Tangible, double Delta)
 {
     AddTangibleIfNotExists(Tangible);
     _Market[Tangible].IncomeReduction += Delta;
 }
Exemplo n.º 9
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public void ChangeDemand(Tangible Tangible, double Delta)
 {
     AddTangibleIfNotExists(Tangible);
     _Market[Tangible].Demand += Delta;
 }
Exemplo n.º 10
0
Arquivo: Zone.cs Projeto: jascou/ROTNS
 public void ChangeSupply(Tangible Tangible, double Delta)
 {
     AddTangibleIfNotExists(Tangible);
     _Market[Tangible].Supply += Delta;
 }