from the Pac-Man tribute project by Shaun Williams.
I'm looking for an algorithm to generate mazes to add to https://scratch.mit.edu/projects/56421322/ which is a project written in the Scratch language for young programmers. Shaun's code used below is just what I need, if it can be tweaked to match the size of the maze that works best in Scratch, and if I can write a version of the algorithm in Scratch, or if I can output a large set of mazes which could be loaded up into Scratch (although that is a much less preferable option).
The rows work out OK as long as the vertical adjustment phase of the original project is not executed. The columns work fine with the algorithm's horizontal adjustments as long as the two center columns are conflated into a single column. Vertical segments which have no vertical segment above or below them can safely be moved left or right.