code: func (m *Maze) PathString(path []graph.Vertex) string {
  	var b bytes.Buffer
  	wall := func(w, m walls, ch byte) {
  		if w&m != 0 {
  			b.WriteByte(ch)
  		} else {
  			b.WriteByte(' ')
  		}
  	}
  	for _, row := range m.grid {
  		b.WriteByte('+')
  		for _, cell := range row {
  			wall(cell, 1<<North, '-')
  			b.WriteByte('+')
  		}
  		b.WriteString("\n")
  		for _, cell := range row {
  			wall(cell, 1<<West, '|')
  			b.WriteByte(' ')
  		}
  		b.WriteString("|\n")
  	}
  	for i := 0; i < m.w; i++ {
  		b.WriteString("++")
  	}
  	b.WriteString("+")
  	grid := b.Bytes()
  
  	// Overlay path.
  	last := -1
  	for _, v := range path {
  		p := v.(pos)
  		i := (2*m.w+2)*(2*p.y+1) + 2*p.x + 1
  		grid[i] = '#'
  		if last != -1 {
  			grid[(i+last)/2] = '#'
  		}
  		last = i
  	}
  
  	return string(grid)
  }
docs: // PathString returns the multi-line string representation of the
  // maze with the path marked on it.