} // алгоритм расчета матрицы фрактала public GenerationSettings() { Resolution = new Size(600, 600); IterationCount = 500; QualityFactor = 1; Algorithm = GenerationAlgorithms.OneThreadCalculation; }
public GenerationSettings( Size resolution, int iterCount = 500, GenerationAlgorithms algorithm = GenerationAlgorithms.OneThreadCalculation, int qualityFactor = 1) { Resolution = resolution; IterationCount = iterCount; QualityFactor = qualityFactor; Algorithm = algorithm; }
public void generateMaze(bool b) { deleteMaze(); // width = cameraZoom.width; height = cameraZoom.height; maze = new Cell[height, width]; prepareGrid(); configureCells(); switch (generationNum) { case 0: GenerationAlgorithms.BinaryTree(maze); break; case 1: GenerationAlgorithms.SideWinder(maze); break; case 2: GenerationAlgorithms.AldousBroder(maze, getRandomCell(), getMazeSize()); break; case 3: GenerationAlgorithms.Wilson(maze); break; case 4: GenerationAlgorithms.HuntAndKill(maze, getRandomCell()); break; case 5: GenerationAlgorithms.RecursiveBacktracker(maze, getRandomCell()); break; case 6: GenerationAlgorithms.SimplePrim(maze, getRandomCell(), list => list[MazeGenerator.random.Next(list.Count)]); break; case 7: GenerationAlgorithms.TruePrim(maze, getRandomCell()); break; case 8: GenerationAlgorithms.SimplePrim(maze, getRandomCell(), list => MazeGenerator.random.Next(2) < 1 ? list[MazeGenerator.random.Next(list.Count)] : list[list.Count - 1]); break; case 9: GenerationAlgorithms.Eller(maze); break; case 10: GenerationAlgorithms.RecursiveDivision(maze); break; } root = maze[0, 0]; goal = maze[maze.GetLength(0) - 1, maze.GetLength(1) - 1]; if (b) { braid(p); } to3d(); }