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