termaze

maze generation and pathfinding visualizer
git clone git://git.yotsev.xyz/termaze.git
Log | Files | Refs | README | LICENSE

maze_gen.hpp (1243B)


      1 #pragma once
      2 
      3 #ifndef MAZE_GEN_HPP
      4 #define MAZE_GEN_HPP
      5 
      6 #include <ncurses.h>
      7 
      8 #include <algorithm>
      9 #include <functional>
     10 #include <map>
     11 #include <random>
     12 #include <stack>
     13 #include <thread>
     14 #include <vector>
     15 
     16 #include "colors.hpp"
     17 #include "state.hpp"
     18 #include "timer.hpp"
     19 #include "vec2.hpp"
     20 
     21 namespace maze_gen {
     22 void Backtracker(bool* field, const int& width, const int& height);
     23 void Kruskal(bool* field, const int& width, const int& height);
     24 void PrimRandom(bool* field, const int& width, const int& height);
     25 void PrimWeighted(bool* field, const int& width, const int& height);
     26 void GrowingTree(bool* field, const int& width, const int& height);
     27 void Wilson(bool* field, const int& width, const int& height);
     28 void RecursiveDividerSet(bool* field, const int& width, const int& height);
     29 void RecursiveDivider(bool* field, const int& width, const int& height);
     30 void BinaryTree(bool* field, const int& width, const int& height);
     31 void Eller(bool* field, const int& width, const int& height);
     32 void Sidewinder(bool* field, const int& width, const int& height);
     33 }; // namespace maze_gen
     34 
     35 #endif // MAZE_GEN_HPP
     36 
     37 extern std::map<std::string,
     38     void (*)(
     39         bool* field,
     40         const int& width,
     41         const int& height)>
     42     generators;