This is a Python maze generator and solver game built using the Pygame library. The game generates random mazes and allows the player to navigate through them using arrow keys or WASD keys. The maze generation is based on the Depth-First Search (DFS) algorithm, and the maze solving uses the Breadth-First Search (BFS) algorithm.
- Random maze generation using DFS algorithm
- Maze navigation by the player using arrow keys or WASD keys
- Maze solving using BFS algorithm
- Reset option to generate a new maze
- Timer to record the time taken to solve the maze
- Visually appealing graphics and animations
- Run the script
maze_game.py
using Python (requires Python 3.x and Pygame library). - The maze will be generated, and the player will start at the entrance.
- Use the arrow keys or WASD keys to navigate through the maze.
- Try to reach the exit point indicated by the green cell.
- If you get stuck or want to generate a new maze, press the 'r' key to reset.
- Python 3.x
- Pygame library (Install using
pip install pygame
)
- Arrow keys or WASD keys: Move the player
- 'r' key: Reset the maze
The maze generation algorithm is based on Depth-First Search (DFS), and the maze solving algorithm is based on Breadth-First Search (BFS).