public Fruit RegisterFruit(ObjectNetID objectNetID, bool loadTexture = true) { Fruit f = new Fruit(_gameField.RandomPointInField(), _gameField, loadTexture); _gameField.Fruits.Add(f); return(f); }
//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()); }
public void Eat(Fruit f) { _tail.Insert(0, new Point(Head.X, Head.Y)); f.ResetPosition(_gameField.RandomPointInField()); }