Exemple #1
0
 public bool NegativeEffect(IObject otherStat)
 {
     if (otherStat is BottlePrice)
     {
         Price.NegativeEffect(otherStat);
         if (Price.Count < Settings_.minPriceForBottle)
         {
             Price.Count = Settings_.minPriceForBottle;
         }
         else if (Price.Count > Settings_.maxPriceForBottle)
         {
             Price.Count = Settings_.maxPriceForBottle;
         }
         change = "-" + (otherStat as BottlePrice).Price.Count.ToString();
         return(true);
     }
     else if (otherStat is IValuta)
     {
         Price = new UAH(Price.Count - (otherStat as IValuta).Count);
         if (Price.Count < Settings_.minPriceForBottle)
         {
             Price.Count = Settings_.minPriceForBottle;
         }
         else if (Price.Count > Settings_.maxPriceForBottle)
         {
             Price.Count = Settings_.maxPriceForBottle;
         }
         change = "-" + (otherStat as IValuta).Count.ToString();
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public UAH_Account()
 {
     currency = new UAH("Ukrainian hryvna", 1);
 }