public World(WorldFactory factory)
 {
     plant = factory.CreatePlant();
     herbi = factory.CreateHerbivore();
     pred  = factory.CreatePredator();
 }
Exemple #2
0
 public override string EatHerbivore(Herbivore herbivore)
 {
     return(base.EatHerbivore(herbivore));
 }
Exemple #3
0
 public override string EatHerbivore(Herbivore herbivore)
 {
     return($"Я {this.Name} я сьел {herbivore.Name}");
 }
Exemple #4
0
 public virtual string EatHerbivore(Herbivore herbivore)
 {
     return($"Я {this.Name}, я сьел {herbivore.Name}");
 }