public void RegenerateMaze() { if (mazeGenerators.Length == 0) { return; } if (currentMazeGenerator == null) { currentMazeGenerator = mazeGenerators[0]; } pool.ClearPool(); grid = currentMazeGenerator.Generate(); CreateVisualMaze(grid); }
public int GetCurrentGeneratorIndex() { if (currentMazeGenerator == null) { currentMazeGenerator = mazeGenerators[0]; } for (int i = 0; i < mazeGenerators.Length; i++) { if (currentMazeGenerator == mazeGenerators[i]) { return(i); } } return(-1); }
public void SetGenerationMethod(int index) { currentMazeGenerator = mazeGenerators[index]; }