Write a program to generate 10x10 random mazes. There are multiple approaches to complete this operation. Your program must generate random mazes using the following steps: 1. Choose a starting...

Write a program to generate 10x10 random mazes. There are multiple approaches to complete this operation. Your program must generate random mazes using the following steps: 1. Choose a starting point/cell in your 10x10 matrix. Mark this cell as visited. 2. Each cell has four walls. Choose one of the walls randomly and carve a passage through to get to the adjacent cell, only if the adjacent cell has not been visited yet. This will become your new current cell 3. If all four adjacent cells have been visited, back up to the last cell that has uncarved walls and repeat 4. The program ends when you reach back to the starting point/cell Some sample outputs are provided below for your reference:


Microsoft Word - Assignment.docx CSCI1301–ObjectOrientedProgramming|ASSIGNMENT|Semester22020/2021 Page1of4 1. INSTRUCTIONS: • Name,MatricNumber&Sectionshouldbeincludedinthecommentsofthe programfile/s,atthebeginning. • SubmityourfilesbyuploadingthemtoiTaleemandGoogleClassroom. • JointheGoogleClassroomusingthelinkbelow: https://classroom.google.com/c/MzI5NjIzMzcwNjY3?cjc=6gk2vjo • Allfilesmustbesubmittedas.javaand.txt. • Thisisanexploratoryassignment.Youarefreetorefertoanyonline/offline resourcesaslongasyoudon’tplagiariseandrefertoyoursources.Anyform ofplagiarismishighlyunacceptable. • Thisassignmentcontainstwo(2)exercises.Exercise1iscompulsorywhile Exercise2isoptional. • MoreinstructionsaboutExercise2aredetailedonPage4. • Assignmentbears10Marks(10%ofyourTotalCourseEvaluation). 2. IMPORTANTDATES SUBMISSIONDEADLINE 31stMay2021,11:59PM • Any assignment submitted by24thMay2021, 11:59PMwill be givenabonusof3Marks.Thebonuswillbegiven,iftheassignment scoresatleast7Marksuponchecking. CSCI1301–ObjectOrientedProgramming|ASSIGNMENT|Semester22020/2021 Page2of4 3. EXERCISES Exercise1:Writeaprogramtogenerate10x10randommazes.Therearemultiple approachestocompletethisoperation.Yourprogrammustgeneraterandommazes usingthefollowingsteps: 1. Chooseastartingpoint/cellinyour10x10matrix.Markthiscellasvisited. 2. Eachcellhasfourwalls.Chooseoneofthewallsrandomlyandcarveapassage throughtogettotheadjacentcell,onlyiftheadjacentcellhasnotbeenvisited yet.Thiswillbecomeyournewcurrentcell 3. If all four adjacent cellshavebeenvisited,backup to the last cell thathas uncarvedwallsandrepeat 4. Theprogramendswhenyoureachbacktothestartingpoint/cell Somesampleoutputsareprovidedbelowforyourreference: SampleOutput1: CSCI1301–ObjectOrientedProgramming|ASSIGNMENT|Semester22020/2021 Page3of4 SampleOutput2: Avideodemonstration(filename:6x6Maze.mov)tounderstandtheworking of Steps 1 through 4 have been included as a separate file. The video demonstratesasmallermazeforeaseofunderstanding. Note:Whilewritingthesolution,thefollowingconventionsMUSTbefollowed 1. Theentireexercisemustbecompletedusingonlyasingle.java/txtfile 2. Theclassthatcontainsthemain()mustbenamedassignmaze 3. Theassignmazeclassshouldbecreatedintheassignmentpackage ***ENDOFEXERCISE1*** CSCI1301–ObjectOrientedProgramming|ASSIGNMENT|Semester22020/2021 Page4of4 3.1EXERCISE2INSTRUCTIONS: • Exercise2isabonusquestionandnotcompulsory • Ithasbeenincludedforyoutoscorebonusmarks • Thisexercisehas2marks • Themarksforthisexercisewillbeonlygiven,ifyouscoreatleast5Marksin Exercise1 • ShouldyouscorefullmarksforExercise1,thebonusmarkswillbeaddedto youroverallresult Exercise2:Adryrunistheprocessofaprogrammermanuallyworkingthrough their code to trace the value of variables. There is no software involved in this process.YourjobistodryrunthesolutionforExercise1. Note:Submitthesolutionforthisexerciseasa.pdffile Moreinformationaboutdryrunanditsformatcanbeviewedatthelinkbelow.Copy thislinkinyourbrowsertoaccessthewebsite: http://theteacher.info/websites/ocr_alevel/WebPages/F452_ProgTechn/DryRuns /DryRuns.html ***ENDOFDOCUMENT***
Nov 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here