igushkin / maze

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maze Generator & Solver

This project provides Java implementations of Deep First Search algorithm for generating so called "perfect mazes".

Live Demo

https://igushkin.github.io/maze-client/

Explanation

The algorithm starts at a given cell and marks it as visited. It selects a random neighboring cell that hasn’t been visited yet and makes that one the current cell, marks it as visited, and so on.

If the current cell doesn’t have a neighbor that hasn’t been visited yet, we move back to the last cell with a not-visited neighbor.

The algorithm finished when there is no not-visited cell anymore.

The algorithm is recursive and might cause memory issues for big mazes.

Built With

Getting Started

Prerequisites

This application requires JDK 17 to run.

  1. Dowload the source
git clone https://github.com/igushkin/maze.git
  1. Build the project by running
mvn clean package
  1. Execute the JAR file by running:
java -jar target/mvn-example-1.0-SNAPSHOT.jar
  1. Open client/index.html in the browser

About


Languages

Language:Java 54.4%Language:JavaScript 23.8%Language:HTML 14.2%Language:CSS 7.6%