Question: Sample Output language : Please solve it in JAVA language. Exercise 1: Write a program to generate 12x12 random mazes. There are multiple approaches to


Sample Output language : Please solve it in JAVA language. Exercise 1: Write a program to generate 12x12 random mazes. There are multiple approaches to complete this operation. Your program must generate random mazes using the following steps: (6 Marks) 1. Choose a random wall (vertical or horizontal) between two cells. a. If the cells on each side of that wall are already in the same set, do nothing. b. If the cells on each side of the wall are not in the same set: i. demolish the wall, and ii. merge the sets containing those two cells. 2. Continue choosing random walls until all cells are in the same set. III. AVEL LLI Some sample outputs are provided below for your reference: Sample Output 1: Exercise 1: Write a program to generate 12x12 random mazes. There are multiple approaches to complete this operation. Your program must generate random mazes using the following steps: (6 Marks) Sample Output 1 1. Choose a random wall (vertical or horizontal) between two cells. a. If the cells on each side of that wall are already in the same set, do nothing b. If the cells on each side of the wall are not in the same set: i. demolish the wall, and ii. merge the sets containing those two cells. 2. Continue choosing random walls until all cells are in the same set. WHERE Some sample outputs are provided below for your reference: Sample Output 1: Sample Output language : Please solve it in JAVA language. Exercise 1: Write a program to generate 12x12 random mazes. There are multiple approaches to complete this operation. Your program must generate random mazes using the following steps: (6 Marks) 1. Choose a random wall (vertical or horizontal) between two cells. a. If the cells on each side of that wall are already in the same set, do nothing. b. If the cells on each side of the wall are not in the same set: i. demolish the wall, and ii. merge the sets containing those two cells. 2. Continue choosing random walls until all cells are in the same set. III. AVEL LLI Some sample outputs are provided below for your reference: Sample Output 1: Exercise 1: Write a program to generate 12x12 random mazes. There are multiple approaches to complete this operation. Your program must generate random mazes using the following steps: (6 Marks) Sample Output 1 1. Choose a random wall (vertical or horizontal) between two cells. a. If the cells on each side of that wall are already in the same set, do nothing b. If the cells on each side of the wall are not in the same set: i. demolish the wall, and ii. merge the sets containing those two cells. 2. Continue choosing random walls until all cells are in the same set. WHERE Some sample outputs are provided below for your reference: Sample Output 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
