Пример #1
0
        public static void Gamesize()
        {
            Console.CursorVisible = false;
            Console.SetWindowSize(130, 30);

            snake = new Snake();
            Wall  = new wall();
            food  = new Food();
        }
Пример #2
0
 public static bool GameOver(wall wall)
 {
     for (int i = 1; i < snake.body.Count; i++)
     {
         if (snake.body[0].x == snake.body[i].x && snake.body[0].y == snake.body[i].y)
         {
             return(true);
         }
     }
     for (int i = 0; i < Wall.body.Count; i++)
     {
         if (snake.body[0].x == Wall.body[i].x && snake.body[0].y == Wall.body[i].y)
         {
             return(true);
         }
     }
     return(false);
 }
Пример #3
0
 public Save()
 {
     snake = Game.snake;
     Wall  = Game.Wall;
     food  = Game.food;
 }