Пример #1
0
        //Eat the fruit
        public virtual void Eat(Fruit f)
        {
            Score++;

            //add to snake and change fruit's position
            _tail.Insert(0, new Point(Head.X, Head.Y));
            f.ResetPosition(_gameField.RandomPointInField());
        }
Пример #2
0
 public void Eat(Fruit f)
 {
     _tail.Insert(0, new Point(Head.X, Head.Y));
     f.ResetPosition(_gameField.RandomPointInField());
 }