示例#1
0
        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);
        }
示例#2
0
        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);
        }