Hi I want to create a program that prints out a 20 by 20 RANDOM maze string. In
ID: 3777794 • Letter: H
Question
Hi I want to create a program that prints out a 20 by 20 RANDOM maze string. In this maze I want the character 'W' stand for wall and 'G' for ground. As it's shown in the below comment, I shared a simple example I made myself. The program only needs to create and output something like the example but It should be a solvable maze. NO GRAPHIC NEEDED.
Remember what I have shared is just a 1 minute, easy hand made maze. I am looking for something where each time it randomly creates the maze and the maze also does all the requirments as are listed below.
Reminder:
- I need the code in Java
- Remember to have walls all around the maze as it is shown in the example. There should be only 1 entrance and 1 exist. PLEASE don't add graphic because that's something I wanna do. I just need help with the algorithm of creating a maze string. Thank you.
Example:
wwwwwwwwwwwwwwwwwwww
gggwwwwwwwwwwwwwwwww
wwggggggggggggggggww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwgww
wwwwwwwwwwwwwwwwwggg
wwwwwwwwwwwwwwwwwwww
Note: If you copy the thing in the top to notepad it will make more sense.
Explanation / Answer
or
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.