generateMaze(rows:columns:sparseness:) constructs a two-dimensional Maze initialized with empty cells, then independently turns each location into a wall when a random draw falls below sparseness. Values from 0 to 1 approximate the percentage of blocked cells, producing a fairly open maze suitable for testing search algorithms. section 2.2
Generate and print a maze
var maze = generateMaze(rows: 10, columns: 10, sparseness: 0.2) printMaze(maze) A 10-by-10 maze with 0.2 sparseness is generated and printed using compact cell characters. section 2.2
