Ejemplo n.º 1
0
 static public bool OnCollisionWalls()
 {
     foreach (SnakePoint value in dictionary)
     {
         if (WallPointsManager.CheckedList(value.X, value.Y))
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
        public static void GeneratePoint()
        {
            int    x, y;
            Random random = new Random();

            x = random.Next(1, WallPointsManager.Width - 1);
            y = random.Next(1, WallPointsManager.Height - 1);
            if (!SnakePointsManager.CheckedList(x, y) && !WallPointsManager.CheckedList(x, y) && !CheckedList(x, y))
            {
                FruitPoint fruitPoint = new FruitPoint(x, y);
            }
            else
            {
                GeneratePoint();
            }
        }