private void InitMaze(int row, int col) { CheckDimensions(row, col); rowCount = row; colCount = col; mazeLineData = new List <int>(new int[colCount]); maze = new MazeData(rowCount, colCount); }
public IMazeView Generate(int row, int col) { MazeData maze = new MazeData(row, col); for (int r = 0; r < row; r++) { for (int c = 0; c < col; c++) { if (RandomBool()) { maze.AddSides(r, c, MazeSide.Right); } if (RandomBool()) { maze.AddSides(r, c, MazeSide.Bottom); } } } return(maze); }