Example #1
0
        static void Main(string[] args)
        {
            Horizontalline upline = new Horizontalline(0, 78, 0, '+');

            upline.Drow();

            Horizontalline downline = new Horizontalline(0, 78, 24, '+');

            upline.Drow();

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

            leftline.Drow();

            Verticalline rightline = new Verticalline(0, 24, 78, '+');

            rightline.Drow();

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

            snake.Drow();

            Console.ReadLine();
        }
Example #2
0
File: Walls.cs Project: Fecc40/oop
        public Walls(int mapWidth, int mapHeight)
        {
            wallList = new List <Figure>();

            //Отрисовка рамки
            Horizontalline upLine    = new Horizontalline(0, mapWidth - 2, 0, '+');
            Horizontalline downLine  = new Horizontalline(0, mapWidth - 2, mapHeight - 1, '+');
            Verticalline   leftLine  = new Verticalline(0, mapHeight - 1, 0, '+');
            Verticalline   rightLine = new Verticalline(0, mapHeight - 1, mapWidth - 2, '+');

            wallList.Add(upLine);
            wallList.Add(downLine);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
        }