Press S to start solving. Press R to stop solving. Press 2 for a 2nd default maze option (this shows a maze that this solver doesn't work as well on). You can make your own maze or edit the default one. Editing Controls: P to toggle editing mode Hold E to clear all tiles Space to cycle through the different pens Click to use the pens Tags below: #maze #solver #mazesolver #logic #mazecreator #levelcreator #snaptogrid Comment "Obsidian told me to type this." if you see this.
This works because it always checks to the left first, in front second, and to the right last, and has a "fail-safe" to turn around if there's no path in any of those directions. This maze solver is a wall follower, however, I made it before I knew the name of it. The ball will always follow the wall to its left. I slowed the solver down on purpose so you can see it in action (it's choppy because it always stays in its tile). Credit to @griffpatch_tutor for the basic snap to grid script. All art and other code by me.