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

            AddToArray(newAlga);
        }
예제 #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");
 }