コード例 #1
0
        public void RunForSettings(MazeGenerationSettings settings, bool parallel = false, int iterations = 100)
        {
            _outputWriter.Print("Random ");
            Settings2.ExtraWalls = WallCarverOption.Random;
            var results1 = RunExperiment(settings, iterations, parallel);

            _outputWriter.PrintLn("Finshed");

            _outputWriter.Print("Dead end ");
            Settings2.ExtraWalls = WallCarverOption.DeadEndWithPreferredDirection;
            var results2 = RunExperiment(settings, iterations, parallel);

            _outputWriter.PrintLn("Finshed");

            _outputWriter.Print("Dead end preferred ");
            Settings2.ExtraWalls = WallCarverOption.DeadEnd;
            var results3 = RunExperiment(settings, iterations, parallel);

            _outputWriter.PrintLn("Finshed");

            _outputWriter.Print("None ");
            Settings2.ExtraWalls = WallCarverOption.None;
            var results4 = RunExperiment(settings, iterations, parallel);

            _outputWriter.PrintLn("Finshed");

            _outputWriter.PrintLn($"Random");
            PrintResults(results1);
            _outputWriter.PrintLn($"Dead end");
            PrintResults(results2);
            _outputWriter.PrintLn($"Dead end preferred");
            PrintResults(results3);
            _outputWriter.PrintLn($"None");
            PrintResults(results4);
        }