code: func NewMaze(w, h int) *Maze {
  	// Allocate one slice for the whole 2-d cell grid and break up into rows.
  	all := make([]walls, w*h)
  	for i := range all {
  		all[i] = allWalls
  	}
  	m := &Maze{w: w, h: h, grid: make([][]walls, h)}
  	for i := range m.grid {
  		m.grid[i], all = all[:w], all[w:]
  	}
  
  	// All cells start with all walls.
  	m.generate(rand.Intn(w), rand.Intn(h))
  
  	return m
  }
docs: // NewMaze returns a new, randomly generated maze
  // of width w and height h.