14 static constexpr auto BARRIER1 =
'|';
15 static constexpr auto BARRIER2 =
'-';
16 static constexpr auto CORNER =
'+';
22 WAVEFRONT_OBJECT_FILE = 2,
32 static std::string to_string_from_outputs(
output o) {
34 case output::PLAIN_TEXT:
38 case output::WAVEFRONT_OBJECT_FILE:
47 throw std::invalid_argument(
"Invalid output: " + std::to_string(
static_cast<unsigned int>(o)));
54 static output to_output_from_string(
const std::string& o) {
55 if (o.compare(
"txt") == 0) {
56 return output::PLAIN_TEXT;
57 }
else if (o.compare(
"text") == 0) {
58 return output::PLAIN_TEXT;
59 }
else if (o.compare(
"json") == 0) {
61 }
else if (o.compare(
"obj") == 0) {
62 return output::WAVEFRONT_OBJECT_FILE;
63 }
else if (o.compare(
"object") == 0) {
64 return output::WAVEFRONT_OBJECT_FILE;
65 }
else if (o.compare(
"png") == 0) {
67 }
else if (o.compare(
"jpeg") == 0) {
69 }
else if (o.compare(
"jpg") == 0) {
71 }
else if (o.compare(
"stdout") == 0) {
72 return output::STDOUT;
74 throw std::invalid_argument(
"Invalid output: " + o);
79 enum class algo :
unsigned int {
89 static std::string to_string_from_algo(
algo a) {
91 case algo::BINARY_TREE:
93 case algo::SIDEWINDER:
98 throw std::invalid_argument(
"Invalid algo: " + std::to_string(
static_cast<unsigned int>(a)));
105 static algo to_algo_from_string(
const std::string& a) {
106 if (a.compare(
"binary_tree") == 0) {
107 return algo::BINARY_TREE;
108 }
else if (a.compare(
"sidewinder") == 0) {
109 return algo::SIDEWINDER;
110 }
else if (a.compare(
"dfs") == 0) {
113 throw std::invalid_argument(
"Invalid algo: " + a);
Namespace for the maze builder.
Definition algo_interface.h:9
output
Enum class for output types.
Definition enums.h:19
Direction
Directional neighbors for grid topology.
Definition enums.h:118
algo
Enum class for maze types by the generating algorithm.
Definition enums.h:79