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