示例#1
0
文件: Walls.cs 项目: 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);
        }