Skip to content

Revathi054/Maze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฉ Maze Game

A fun and interactive web-based Maze Game built using HTML, CSS, and JavaScript with a canvas-based visualization of a procedurally generated maze. Navigate the player from start to finish without revisiting any cell, or you'll need to restart!

๐ŸŽฎ Features

  • ๐ŸŽจ Maze Generation: Dynamic maze generated using recursive backtracking.
  • ๐Ÿง Player Navigation: Move using arrow keys or on-screen direction buttons.
  • ๐Ÿ” Restart Logic: If a previously visited cell is entered, a restart message is shown.
  • ๐Ÿ Win Detection: Game ends successfully when the player reaches the bottom-right cell.
  • โœจ Scoreboard:
    • +10 points for valid moves.
    • -10 points for invalid moves (with a lower bound of 0).
  • ๐Ÿง  Solution Path Validation: Ensures user remains within the solvable maze path.

๐Ÿ“ Project Structure

MazeGame/ โ”‚ โ”œโ”€โ”€ index.html # Main HTML structure โ”œโ”€โ”€ style.css # Styling for UI elements โ””โ”€โ”€ (All scripts are inline inside index.html)

๐Ÿš€ How to Run

  1. Clone the Repository

    git clone https://github.com/your-username/maze-game.git
    cd maze-game

2.Run in Browser

Simply open index.html in your web browser.

OR

Use Live Server in VS Code

Install Live Server Extension

Right-click on index.html and choose "Open with Live Server"

๐Ÿ”ง Controls Start: Click the Start button to generate a new maze.

Move Player:

Keyboard: Use ArrowUp, ArrowDown, ArrowLeft, ArrowRight

Buttons: Click the corresponding Up / Down / Left / Right buttons

๐Ÿ† Scoring Rules +10 for each valid move.

-10 for each invalid move (score cannot drop below 0).

Visiting a previously visited cell ends the game and shows a restart option.

๐Ÿ–ผ๏ธ Screenshots Screenshot (197) Screenshot (198)

๐Ÿ“Œ Future Improvements โฑ๏ธ Add a timer for speed-based scoring.

๐Ÿ’พ Save high scores in browser local storage.

๐Ÿง  Add AI-based auto-solver visualization.

๐ŸŽฎ Support for difficulty levels (larger maze sizes).

๐Ÿค Contributing

Contributions are welcome! Feel free to fork the repo and submit pull requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published