Esempio n. 1
0
File: Walls.cs Progetto: GDZy/snake
        public Walls(int mapWidth, int mapHight, char sym)
        {
            wallList = new List<Figure>();

            HorizontalLine topLine = new HorizontalLine(0, mapWidth-2, 0, '+');
            HorizontalLine bottomLine = new HorizontalLine(0, mapWidth-2, mapHight-1, '+');
            VerticalLine leftLine = new VerticalLine(0, 0, mapHight-1, '+');
            VerticalLine rightLine = new VerticalLine(mapWidth-1, 0, mapHight-2, '+');

            wallList.Add(topLine);
            wallList.Add(bottomLine);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
        }
Esempio n. 2
0
File: Walls.cs Progetto: GDZy/snake
        public Walls(int mapWidth, int mapHight, char sym)
        {
            wallList = new List <Figure>();

            HorizontalLine topLine    = new HorizontalLine(0, mapWidth - 2, 0, '+');
            HorizontalLine bottomLine = new HorizontalLine(0, mapWidth - 2, mapHight - 1, '+');
            VerticalLine   leftLine   = new VerticalLine(0, 0, mapHight - 1, '+');
            VerticalLine   rightLine  = new VerticalLine(mapWidth - 1, 0, mapHight - 2, '+');

            wallList.Add(topLine);
            wallList.Add(bottomLine);
            wallList.Add(leftLine);
            wallList.Add(rightLine);
        }