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