Maze Generater and Solver in JAVA
Introduction
This is a Java program that generates and solves mazes using recursive backtracking algorithm. The program creates a maze of a specified size and then solves it by finding the shortest path from the starting point to the ending point.
Features
- Generates a random maze using depth-first search algorithm.
- Solves the maze by finding a path from the start to the end using recursive backtracking algorithm.
- The maze is displayed graphically on a JPanel.
- The maze can be customized by changing various parameters, such as the number of rows and columns, the size of each cell, and the minimum number of pixels between the maze and the edge of the panel.
Prerequisities
- Java Development Kit (JDK) version 8 or higher.
- An integrated development environment (IDE) that supports Java, such as Eclipse or IntelliJ IDEA.
Installing
Clone : git clone https://github.com/0sheetalkumari0/Maze_Solver.git
or download the repository (zip file) to your local machine.
Running
- Compile the Maze.java file using the Java compiler.
javac Maze.java
- Run the Maze class using the Java Virtual Machine.
java Maze