Generate a new level "map" by clicking the green arrow. Can be done multiple times. Do not run in turbo mode, this version requires screen refresh to work.
This is just a test for my own purposes, however I found the end result fascinating enough to share. Basically each tile is placed one by one. It will check all around itself to see if there is a tile with a "wall" facing it. If so, it logs that position. If it encounters an area around it with no tiles, it will randomly decide whether there is or isn't a wall. It then counts the number of walls touching it and their positions, and places itself in a way that fits. It goes on for each and every tile until the maze is complete. There are only 6 possible tiles in this version: Open - No walls anywhere Wall - A single wall on one of the four sides Hall - 2 walls, one on either side Corner - 2 walls, perpendicular Closet - 3 walls (one opening) Structure - 4 walls, completely filled in. all work is original