Build and solve a virtual maze with C++.
The codebase was developed and tested on Ubuntu 16.04.
- CMake, at least v3.0
- Compiler clang 3.8.0, using default gcc 6.2.0 standard library, (not libc++ of LLVM).
- SFML
- Boost
You don't have to install Boost manually, it will be installed with Hunter package manager,
when you configure and build the project, (see below).
You have to install SFML library manually though, easy as running sudo apt-get install libsfml-dev in your terminal
(for Ubuntu). See other installation options in SFML getting started page.
- Run
./configuretwo times for release configuration. - Run
cmake --build buildto build the project inbuildfolder.
- Run
./configure debugtwo times for debug configuration. - Run
cmake --build build-debugto build the project inbuild-debugfolder.
- Release:
build/cppmaze [columns] [rows] [mode] - Debug:
build-debug/cppmazed [columns] [rows] [mode]
Columns ranges from 1 to 73, rows from 1 to 38. You can change these ranges in the code, but the maze will probably exceed the screen boundaries if you increase the maximum values.
Mode is 0 if you want to watch the built maze only and 1 if you want to watch the maze solved. Default start and goal positions are {1,1} and the bottom right corner of the maze respectively, I did'nt make these configurable through the command line, but you can easily modify the code and choose any start and goal positions.
You can control the speed of the animation with the framerate, see source/main/main.cpp.
Default setting is window.setFramerateLimit(30);.
build/cppmaze 73 38 0, will build a maze of 2774 rooms, you will watch the building process.build/cppmaze 40 20 1, will build a maze of 800 rooms, you will watch the solving process.
Run tests with cmake --build build-debug --target test

