コード例 #1
0
ファイル: TaskSolver.cs プロジェクト: sgurov/Training
        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
ファイル: FileHandler.cs プロジェクト: sgurov/Training
        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);
        }