This project implements a maze-solving application using Python and the Tkinter library. It includes classes for creating a maze, drawing it on a graphical window, breaking down walls, and solving the maze using a depth-first search algorithm.
- Python 3.x
- Pip (Python package installer)
-
Clone the repository to your local machine:
git clone https://github.com/deltaCS99/maze-solver.git
-
Navigate to the project directory:
cd maze-solver
-
Create a virtual environment (optional but recommended):
python -m venv venv
-
Activate the virtual environment (On Unix or MacOS):
source venv/bin/activate
-
Install project dependencies:
pip install -r requirements.txt
-
Run the main script:
python main.py
-
Maze Creation: The project generates a maze with specified dimensions, where each cell can have walls on its four sides.
-
Visualization: The maze creation and solving processes are visualized in a graphical window.
-
Algorithm: The maze-solving algorithm uses a depth-first search to find a path from the entrance to the exit.
-
main.py
: Entry point of the application. Creates an instance of the maze and triggers the maze-solving process. -
maze.py
: Contains theMaze
class, responsible for maze creation, visualization, and solving. -
cell.py
: Defines theCell
class representing individual cells in the maze. -
point.py
andline.py
: Classes for handling points and lines used in graphical drawing. -
window.py
: Manages the Tkinter graphical window for visualizing the maze.
-
Run
main.py
to see the maze creation and solving process. -
Adjust parameters in
main.py
to modify the maze dimensions, cell size, and other settings.
-
Python: This project is written in Python (version 3.6 and above).
-
Tkinter: The Tkinter library is used for creating the graphical window.
Feel free to contribute by opening issues or submitting pull requests.
This project is licensed under the MIT License.