Ejemplo n.º 1
0
        public Walls(int MapW, int MapH)
        {
            walls = new List<Figure>();

            HLine tline = new HLine(0, MapW-2, 0, '+');
            HLine bline = new HLine(0, MapW-2, MapH-1, '+');
            VLine lline = new VLine(0, MapH-1, 0, '+');
            VLine rline = new VLine(0, MapH-1, MapW-2, '+');

            walls.Add(tline);
            walls.Add(rline);
            walls.Add(bline);
            walls.Add(lline);
        }
Ejemplo n.º 2
0
        public Walls(int mapWidth, int mapHeight)
        {
            wallList = new List <Figure>();

            HLine upLine    = new HLine(0, mapWidth - 2, 0, '-');
            HLine downLine  = new HLine(0, mapWidth - 2, mapHeight - 1, '-');
            VLine leftLine  = new VLine(0, mapHeight - 1, 0, '|');
            VLine rightLine = new VLine(0, mapHeight - 1, mapWidth - 2, '|');

            wallList.Add(upLine);
            wallList.Add(downLine);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
        }
Ejemplo n.º 3
0
        public Walls(int MapW, int MapH)
        {
            walls = new List <Figure>();

            HLine tline = new HLine(0, MapW - 2, 0, '+');
            HLine bline = new HLine(0, MapW - 2, MapH - 1, '+');
            VLine lline = new VLine(0, MapH - 1, 0, '+');
            VLine rline = new VLine(0, MapH - 1, MapW - 2, '+');

            walls.Add(tline);
            walls.Add(rline);
            walls.Add(bline);
            walls.Add(lline);
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            HLine hl = new HLine(0, 119, 0, '#');

            hl.Draw();
            VLine vl = new VLine(119, 1, 29, '#');

            vl.Draw();
            HLine hl1 = new HLine(0, 119, 29, '#');

            hl1.Draw();
            VLine vl1 = new VLine(0, 1, 29, '#');

            vl1.Draw();

            Point p     = new Point(4, 5, '*');
            Snake snake = new Snake(p, 4, Direction.RIGHT);

            snake.Draw();
            snake.Handler();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            //размер окна
            Console.SetBufferSize(120, 30);

            //отрисовка линий
            HLine hLineUp = new HLine(0, 118, 0, '*');

            hLineUp.Drow();

            HLine hLineDown = new HLine(0, 118, 29, '*');

            hLineDown.Drow();

            VLine vLineLeft = new VLine(0, 29, 0, '*');

            vLineLeft.Drow();

            VLine vLineRight = new VLine(0, 29, 118, '*');

            vLineRight.Drow();

            Console.ReadLine();
        }