Pac-Man Maze Generation

We start with the following 5x9 grid of tiles:

In red is the path around the ghost pen. In blue is Pac-Man's starting position.

We then proceed by playing tetris. Pieces fall to the left-hand side. No gaps can be made.

The edges create paths inside the maze. We erase some of them on the border for variation.