コード例 #1
0
ファイル: Program.cs プロジェクト: Maksim420/snake
        static void Main(string[] args)
        {
            Point p2 = new Point(4, 4, '#');

            int arenaLength = 100;
            int arenaHeight = 25;

            HorLine LineUp = new HorLine(0, arenaLength, 0, '#');

            LineUp.Draw();

            HorLine LineDown = new HorLine(0, arenaLength, arenaHeight, '#');

            LineDown.Draw();

            VertLine LineLeft = new VertLine(0, arenaHeight, 0, '#');

            LineLeft.Draw();

            VertLine LineRight = new VertLine(0, arenaHeight, arenaLength, '#');

            LineRight.Draw();

            Console.ReadKey();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: ApuhtinAlex/snake
        static void Main(string[] args)
        {
            Console.SetBufferSize(80, 25);


            ClassPoint p1 = new ClassPoint(4, 5, '#');

            p1.Draw();


            // рисуем рамку

            HorizLine upline = new HorizLine(0, 78, 0, '+');

            upline.Drow();
            HorizLine downline = new HorizLine(0, 78, 24, '+');

            downline.Drow();



            VertLine leftline = new VertLine(0, 24, 0, '+');

            leftline.Drow();
            VertLine rightline = new VertLine(0, 24, 78, '+');

            rightline.Drow();

            Console.ReadLine();
        }
コード例 #3
0
ファイル: Walls.cs プロジェクト: sined1993/SnakeCsharp
        public Walls(int mapWidth, int mapHeigth)
        {
            wallList = new List<Figure>();

            Console.SetWindowSize(mapWidth, mapHeigth);

            HorizontLine lineTop = new HorizontLine(0, mapWidth - 2, 0, '+');
            HorizontLine lineFoot = new HorizontLine(0, mapWidth - 2, mapHeigth -1, '+');
            VertLine leftLine = new VertLine(0, mapHeigth - 1, 0, '+');
            VertLine rightLine = new VertLine(0, mapHeigth - 1, mapWidth - 2, '+');

            wallList.Add(lineTop);
            wallList.Add(lineFoot);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
        }
コード例 #4
0
ファイル: Walls.cs プロジェクト: DKhromov1993/SnakeCsharp
        public Walls(int mapWidth, int mapHeigth)
        {
            wallList = new List <Figure>();

            Console.SetWindowSize(mapWidth, mapHeigth);

            HorizontLine lineTop   = new HorizontLine(0, mapWidth - 2, 0, '+');
            HorizontLine lineFoot  = new HorizontLine(0, mapWidth - 2, mapHeigth - 1, '+');
            VertLine     leftLine  = new VertLine(0, mapHeigth - 1, 0, '+');
            VertLine     rightLine = new VertLine(0, mapHeigth - 1, mapWidth - 2, '+');

            wallList.Add(lineTop);
            wallList.Add(lineFoot);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
        }
コード例 #5
0
        static void Main(string[] args)
        {
            Console.SetWindowSize(1, 1);
            Console.SetBufferSize(80, 25);
            Console.SetWindowSize(80, 25);

            //Рамочка
            HorizontLine upLine     = new HorizontLine(0, 78, 0, '+');
            HorizontLine downLine   = new HorizontLine(0, 78, 24, '+');
            VertLine     leftLine   = new VertLine(0, 24, 0, '+');
            VertLine     righttLine = new VertLine(0, 24, 78, '+');

            upLine.Drow();
            downLine.Drow();
            leftLine.Drow();
            righttLine.Drow();


            Point p = new Point(4, 5, '*');

            p.Draw();
        }