Exemple #1
0
        public void TestMethod1()
        {
            ChemicalFactory cf       = new ChemicalFactory();
            var             oreCount = cf.run("Input0.txt");

            Assert.AreEqual(165, oreCount);
        }
Exemple #2
0
        public void TestMethod4()
        {
            ChemicalFactory cf       = new ChemicalFactory();
            var             oreCount = cf.run("Input3.txt");

            Assert.AreEqual(2210736, oreCount);
        }
Exemple #3
0
        public void MyTestInitialize()
        {
            ChemicalFactory cn = ChemicalFactory.Instance;

            Na = cn.GetChemical(ChemicalNames.Na);
            Cl = cn.GetChemical(ChemicalNames.Cl);

            WWC = new WaterPacket(100);
            WWC.AddChemical(Na, 3);
            WWC.AddChemical(Cl, 2);
        }
Exemple #4
0
 override public void SetBasement(SurfaceBlock b, PixelPosByte pos)
 {
     if (b == null)
     {
         return;
     }
     SetBuildingData(b, pos);
     if (current != null & current != this)
     {
         current.Annihilate(false);
     }
     current = this;
 }
Exemple #5
0
 override public void Annihilate(bool forced)
 {
     if (destroyed)
     {
         return;
     }
     else
     {
         destroyed = true;
     }
     PrepareWorkbuildingForDestruction(forced);
     if (current == this)
     {
         current = null;
     }
     Destroy(gameObject);
 }