Skip to content

lululululu5/maze-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maze Solver

Project Description

Maze Solver is a Python program that uses Tkinter to draw a maze, randomly breaks walls, and then finds a solution using a recursive approach. This project showcases an object-oriented approach to maze generation and solving, with an easy-to-use graphical interface built on the Tkinter library.

Features

  • Object-Oriented Design: Classes for maze components such as cells and walls.
  • Recursive Maze Generation: Randomly breaks walls to create a solvable maze.
  • Recursive Maze Solving: Uses a recursive backtracking algorithm to find the solution path.
  • Graphical Interface: Built with Tkinter for an interactive experience.
  • Testing: Includes unittest and mock data to validate the recursive algorithms.

Installation Instructions

To set up and run the project, follow these steps:

  1. Clone the project repository:
git clone
  1. Navigate to the project directory:
cd maze-solver
  1. Set up a virtual environment:
python -m venv venv
  1. Activate the virtual environment:
  • On Windows:
    venv\Scripts\activate
    
  • On MacOS/Linux:
    source venv/bin/activate
    
  1. Install Tkinter (if not already installed):
pip install tk
  1. Run the project:
python main.py

Technologies Used

  • Python: Core programming language used for the project.
  • Tkinter: Library for building the graphical user interface.
  • Unittest: Framework for testing the maze generation and solving algorithms.

Project Structure

The project is organized into several key components:

  • main.py: The main entry point for running the maze solver application.
  • maze.py: Contains the Maze class responsible for creating and managing the maze structure.
  • cell.py: Defines the Cell class representing individual cells in the maze.
  • graphics.py: Manages the graphical representation of the maze using Tkinter.

Each component is designed to handle specific aspects of the maze's construction, display, and solving process, ensuring a modular and maintainable codebase.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages