Exemplo n.º 1
0
        public static void Init()
        {
            isActive = true;
            snake = new Snake();// создаем экземпляры
            food = new Food();
            wall = new Wall();

            snake.body.Add(new Point { x = 19, y = 21 });// добавляет объект(положение змеи) к массиву точек змеи
            food.body.Add(new Point { x = 9, y = 21 });

            food.color = ConsoleColor.Green;
            wall.color = ConsoleColor.White;
            snake.color = ConsoleColor.Yellow;

            Console.SetWindowSize(48, 48);
        }
Exemplo n.º 2
0
        public static void Init()
        {
            isActive = true;
            snake = new Snake();
            food = new Food();
            wall = new Wall();

            snake.body.Add(new Point { x = 20, y = 20 });
            food.body.Add(new Point { x = 10, y = 20 });

            food.color = ConsoleColor.Green;
            wall.color = ConsoleColor.White;
            snake.color = ConsoleColor.Yellow;

            Console.SetWindowSize(48, 48);
        }