Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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. Some sample outputs are provided below for your reference: Sample Output 1: _l_l_ _I_ I _ I_I_I_ | __i_ | -I_ |_| |_ |_ | |_ I _L _ 1 IL | |_ |_I_I. I_I__IL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Determine the amplitude and period of each function.

Answered: 1 week ago