A right skewed binary tree maze that is always solvable

While playing around with different maze algorithms I created a short binary tree maze that is right skewed. Every run a different maze will be created but the maze should be always solvable. Entry is in the left upper corner, exit is in the lower right corner.

The source code, which was written in Microsoft Basic V2, is quite short and should be easy to understand. After a base structure has been drawn to the screen, the maze creation process starts in the first cell of the upper left corner. It either opens a passage to the left or to the top, but never in both directions. If one row is done, it goes down to the next row and starts all over again. The two borders closest to the start cell will get the same treatment: all passages are opened along the border.

Unfortunately, in this first version the created mazes are a bit too easy to solve. You might be able to entertain very small kids for some time on a rainy day, though. The next version should fix this and create more difficult mazes. I guess the key to solving this is by closing the top passage along the border at least partially.

See the GitHub repository for the source code.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert


The reCAPTCHA verification period has expired. Please reload the page.