/MazeSolver

A simple web-based maze generator implemented in JavaScript using two algorithms: Prim's algorithm and Depth-First Search (DFS). The generated maze is displayed on an HTML5 canvas, and you can navigate through it by moving a red dot.

Primary LanguageJavaScript

MazeSolver

A simple web-based maze generator implemented in JavaScript using two algorithms: Prim's algorithm and Depth-First Search (DFS). The generated maze is displayed on an HTML5 canvas, and you can navigate through it by moving a red dot.

image

Demo

Explore the maze generator game here.

Features

  • Two maze generation algorithms: Prim's and DFS.
  • Maze solving: Move the red dot through the generated maze using arrow keys.
  • Adjustable maze size: Choose from various maze sizes.
  • Reset functionality: Reset the maze to its initial state.

How to Use

  1. Open index.html in a web browser.
  2. Choose the maze size from the dropdown menu.
  3. Select the maze generation algorithm (Prim's or DFS) from the dropdown menu.
  4. Click the "Start" button to generate the maze.
  5. Navigate through the maze using the arrow keys.

Project Structure

  • index.html: HTML file containing the structure of the web page.
  • style.css: CSS file for styling the web page.
  • script.js: JavaScript file containing the maze generation and navigation logic.
  • README.md: Documentation file for the project.