示例#1
0
        public static void Run(List <Point> points, List <Wall> walls)
        {
            int[,] plane = InitializePlane(points, walls);

            while (IsHavingDryArea(plane))
            {
                List <Wall> brokenWalls = SearchBrokenWalls(walls, plane);

                RemoveBrokenWalls(walls, brokenWalls);

                FillPlane(walls, plane);
            }

            ConsolePrinter.PrintResult(walls);
        }
示例#2
0
        public static string[] ReadInputData(string path)
        {
            string[] result;

            if (File.Exists(path))
            {
                result = File.ReadAllLines(path);
                return(result);
            }
            else
            {
                ConsolePrinter.PrintLine("File doesn't exist!");
            }

            return(null);
        }