public virtual bool Eat(SmallFish smallFish) { if (!(smallFish is SmallFish)) { return(false); } bool b = false; ++count; //if (count == 1) n = Char.ToUpper(n); // Присвоїти нову картинку. //if (count == 2) b = true; return(b); }
public override bool Eat(SmallFish smallFish) { if (smallFish is BigFish || smallFish is SmallFish) { return(false); } MediumFish fish = (MediumFish)smallFish; if (fish.Count == 1 || this.Count == 1) { return(true); } this.count++; return(false); }