private void PrepareGameBeforeMovement(Snake snake, Fruit fruit) { snake.snakeParts.Add("¤"); snake.xRoutes.Add(snake.SnakeHeadX); snake.yRoutes.Add(snake.SnakeHeadY); fruit.SpawnFruit(snake); }
private void CheckIfFruitIsEaten(Snake snake, Fruit fruit) { Start start = new Start(); if (snake.SnakeHeadX == Fruit.FruitXCoord && snake.SnakeHeadY == Fruit.FruitYCoord) { snake.ExtendSnake(); fruit.SpawnFruit(snake); start.DisplayCurrentScore(snake.snakeParts.Count - 1); } }