예제 #1
0
 /// <summary>
 /// Находится ли голова змейки на яблоке
 /// </summary>
 public bool IsEaten(Apple apple)
 {
     return(Blocks[0].Location.X == apple.Location.X &&
            Blocks[0].Location.Y == apple.Location.Y);
 }
예제 #2
0
 void RegenerateApple()
 {
     apple = new Apple(new AppleGen(FieldSize, snake.Blocks.Select(x => x.Location), Padding), ref rnd);
 }