Maze Builder Docs 6.3.5
Loading...
Searching...
No Matches
configurator.h
Go to the documentation of this file.
1#ifndef CONFIGURATOR_H
2#define CONFIGURATOR_H
3
4#include <string>
5
6#include <MazeBuilder/enums.h>
7
8namespace mazes {
9
11
15public:
16
17 configurator& rows(unsigned int r) noexcept {
18 rows_ = r;
19 return *this;
20 }
21
22 configurator& columns(unsigned int c) noexcept {
23 columns_ = c;
24 return *this;
25 }
26
27 configurator& levels(unsigned int l) noexcept {
28 levels_ = l;
29 return *this;
30 }
31
32 configurator& _algo(algo _a) noexcept {
33 algo_ = _a;
34 return *this;
35 }
36
37 configurator& block_id(int val) noexcept {
38 block_id_ = val;
39 return *this;
40 }
41
42 configurator& seed(unsigned int s) noexcept {
43 seed_ = s;
44 return *this;
45 }
46
47 configurator& distances(bool d) noexcept {
48 distances_ = d;
49 return *this;
50 }
51
52 configurator& _output(output o) noexcept {
53 output_ = o;
54 return *this;
55 }
56
57 // Getters for the configuration options
58 unsigned int rows() const noexcept { return rows_; }
59 unsigned int columns() const noexcept { return columns_; }
60 unsigned int levels() const noexcept { return levels_; }
61 algo _algo() const noexcept { return algo_; }
62 int block_id() const noexcept { return block_id_; }
63 unsigned int seed() const noexcept { return seed_; }
64 bool distances() const noexcept { return distances_; }
65 output _output() const noexcept { return output_; }
66
67private:
68 unsigned int rows_ = 1;
69 unsigned int columns_ = 1;
70 unsigned int levels_ = 1;
71 int block_id_ = -1;
72 algo algo_ = algo::DFS;
73 unsigned int seed_ = 0;
74 bool distances_ = false;
75 output output_ = output::STDOUT;
76};
77
78} // namespace
79
80#endif // CONFIGURATOR_H
Configuration class for the maze builder.
Definition configurator.h:14
Definition distances.h:13
Enumerations for the maze builder program.
Namespace for the maze builder.
Definition algo_interface.h:9
output
Enum class for output types.
Definition enums.h:19
algo
Enum class for maze types by the generating algorithm.
Definition enums.h:79