user profile image

Generating a maze with a simple algorithm
1. Find available directions 2. pick one at random 3. if no available directions, backtrack to last position loop step 1 to 3 until back at start location


  1. Is there an official start/end?

  2. No, but there will always only be one path between any two given points. So any start and end would do. for example top left to bottom right corner.

  3. Really love this, especially that you can change the dimensions/colors :D
    nice work on the math , too!

  4. hi, can i PM you on Gitter. I am trying to do the same thing, but in React, no canvas, for FreeCodeCamp challenge. I am struggling with the math.

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.