Example #1
0
        public void ExchangeFabric(Fabric oldFabric, Fabric newFabric)
        {
            int oldFaricIndex = GetIndex(oldFabric);

            if (HasFabric(oldFaricIndex))
            {
                Fabrics[oldFaricIndex] = newFabric;
            }
        }
Example #2
0
        public void RemoveFabric(Fabric fab)
        {
            int index = GetIndex(fab);

            if (HasFabric(index))
            {
                Fabrics[index] = null;
            }
        }
Example #3
0
 public int GetIndex(Fabric fabric)
 {
     for (int i = 0; i < Fabrics.Length; i++)
     {
         if (Fabrics[i] == fabric)
         {
             return(i);
         }
     }
     return(-1);
 }
Example #4
0
 public Director()
 {
     //start kit
     Bank           = null;
     Materials      = 4;
     Product        = 2;
     Money          = 10000;
     _bankrupt      = false;
     Fabrics        = new Fabric[6];
     _fab_fix_costs = 0;
     for (int i = 0; i < 2; i++)
     {
         Fabrics[i] = new SimpleFabric(this, 0);
     }
     UpdateFabCosts();
 }