Ejemplo n.º 1
0
        public Walls(int mapWidth, int mapHeight)
        {
            wallList = new List <Figure>();
            int x = 85, y = 43;
            // Отрисовка рамочки
            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, '║');
            lucorner       Lucorner = new lucorner(0, 0, '╔');
            rucorner       Rucorner = new rucorner(x - 2, 0, '╗');
            ldcorner       Ldcorner = new ldcorner(0, y - 1, '╚');
            rdcorner       Rdcorner = new rdcorner(x - 2, y - 1, '╝');

            wallList.Add(upLine);
            wallList.Add(downLine);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
            wallList.Add(Lucorner);
            wallList.Add(Rucorner);
            wallList.Add(Ldcorner);
            wallList.Add(Rdcorner);
        }