Esempio n. 1
0
 public Aquarium()
 {
     FishList      = new Fish[0];
     AlgaList      = new Alga[0];
     AttackHerb    = null;
     AttackCarn    = null;
     ReproduceFish = null;
     ReproduceAlga = null;
     Report        = new List <string>();
 }
Esempio n. 2
0
        public void AddAlga(int newAge, int newPV) //Add algas to the aquarium
        {
            Alga newAlga = new Alga(newAge, newPV);

            AddToArray(newAlga);
        }
Esempio n. 3
0
 protected void Eat(Alga victim) // eat the alga
 {
     victim.GetDamage(2);        // inflicts damage to victim
     this.GetHeal(3);            // gets PV from eating
     ReportToAqua(this.name + " ate alga");
 }