Create stack of points and push starting location Create a start point with x values as maximum number of rows - 1, and y values as maximum number of columns - 1 initialize a hold of points as max rows - 1 Add temp to maze arraylist, increment max rowsį. ![]() Here's my Algorithm:ģ)Create variables to hold numbers of columns and rowsĮ. Feel free to create any additionalĬlasses that will help you complete the assignment. Your program should use a stack to record the path that it is exploring and backtrack when itīe sure to write a complete algorithm before writing your code. One solution path, but in this exercise you are only being asked to locate one solution, not Please note that a maze may have more than Not found a message should be sent to the file. If a path is found the output file should contain the path. You may assume that the entrance to the maze is always in the lower right handĬorner, and the exit is always in the upper left hand corner. ![]() The character 'X' represents a wall or a blocked position and the character 'O' represents an Here's the assignment: Write an application that finds a path through a maze. I've been assigned with the task of creating a maze solver in Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |