Skip to content

emmonbear/A1_Maze_CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

| Contributors | Forks | Stargazers | Issues | MIT License |


Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact

About The Project

Appearance

The goal of this project is to implement a program program that can generate and render perfect mazes.

  • The program is developed in the C++ standard language using the gcc compiler. Additional libraries and Qt modules are used;
  • The program code is located in the src folder;
  • The program and test build is configured using CMake, which is launched using Makefile with a standard set of targets for a GNU program: all, install, uninstall, clean, dvi, dist, tests, gcov_report. Installation is carried out in the bin folder in the repository root;
  • The program is developed in accordance with the principles of object-oriented programming. The following development patterns are used: Facade, MVC;
  • The code is written in accordance with Google Style;
  • Modules related to loading and saving a maze to a file, generating an ideal maze, and solving a maze are covered with unit tests;;
  • The program allows you to:
    • The maze can be stored in a file as a number of rows and columns, as well as two matrices containing the positions of vertical and horizontal walls respectively. The first matrix shows the wall to the right of each cell, and the second — the wall at the bottom.
      An example of such a file:
      4 4
      0 0 0 1
      1 0 1 1
      0 1 0 1
      0 0 0 1
      
      1 0 1 0
      0 0 1 0
      1 1 0 1
      1 1 1 1   
    • The perfect maze is generated according to Eller's algorithm
    • Maximum size of the maze is 50x50
    • The solution of the Perfect Maze is generated according to the DFS (deep first search) algorithm
  • The program has a graphical user interface based on the GUI libraries Qt with API for C++.
  • The graphical user interface contains:
    • A button to load a maze from a file;
    • A button to generate a perfect maze;
    • A button to solve the perfect maze;
    • A button to save the maze to a file;
    • Spinbox for specifying the number of rows;
    • Spinbox for specifying the number of cols;
    • Spinboxes for specifying start and end coordinates;
  • Implementation class inside the s21 namespace;

UML class diagram

Appearance

(back to top)

Built With

(back to top)

Getting Started

To get a local copy and run it, follow these steps.

Required software

  • CMake

    sudo apt install cmake
    
  • Qt

    sudo apt install qt6-base-dev
    

Installation

  1. Install the required software (if missing)
  2. Clone the repository
    git clone [email protected]:emmonbear/A1_Maze_CPP.git
  3. Run the installation program
    make install
  4. Run the program manually (A1_Maze_CPP/bin/maze) or enter the command
    make run
    

(back to top)

Contributing:

contrib.rocks image

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Ilya Moskalev - Telegram / e-mail

(back to top)

About

Implementation of the Maze project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages