Skip to content

Java stand-alone application that generates and solves mazes

Notifications You must be signed in to change notification settings

karthiknayak02/MazeGeneratorSolverJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MazeGeneratorSolverJava

Java stand-alone application that generates and solves mazes

Features

The program runs in two primary modes: maze generation and computer-automated maze solving.

Grid

1. Maze Generation

The program generates a maze using a randomized depth-first search algorithm. The user can visualize the maze construction based on user-selected parameters (resolution in rows and columns, speed).
The result – the randomly generated maze

Generating

2. Automated Depth-First Search Solver

The program solves the maze using a depth-first search algorithm and a stack. The solution can be visualized as the solver runs. The speed of the visualization of the solver’s path through the maze must be controllable by the user.
The cells that are on the active path in one color, backtracked cells (visited but determined to be dead ends) in a second color, and unvisited cells in the default color.

Solving

3. The Graphical User Interface

The GUI has the following functionality for the user:
Generate : Generate a new maze based on current parameters
Solve : Start the automated solver
Stop : Stop the automated generator/solver
Speed : Change speed of the visualization of maze generation and solver
Rows/columns : Set maze resolution (10x10 to 50x50; rows/cols independent)

Other features

Time : Display a running time it takes to generate/solve at a given speed
Percent visited : Displays a running percentage of number of cells visited
Status : Display a running status of the grid

Generated & Solved

How to compile

Download and open directory in terminal
javac Maze.java controlBoard.java mazeGenerator.java mazeSolver.javaCell.java
OR
javac *.java

How to run

java Maze

About

Java stand-alone application that generates and solves mazes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages