I am working on a folder maze generator, where you press [Generate] and in the folder that the application is in, 2 folders are created, named 1, and 2. In each of those folders is up to 4 folders. This is supposed to continue until there is a max of 2048 folders reached, and randomly in one of the folders there is going to be a file called Exit.txt, and if you find it, you win. The problem is.. I HAVE NO FKING IDEA HOW TO DO THIS. I suck at loops and arrays, and I absolutely do NOT want to bruteforce this.

Any code examples, experienced members, etc?

Recommended Answers

All 2 Replies

Hi,
seems like it's the right time for recursion. There plenty of examples with it everywhere, so find it, take a shot to make something in your direction .. I'm here to help if you'll meet any dificulties :)

I made a folder maze without the folder maze generator and it is really cool

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.