13 static constexpr auto BARRIER1 =
'|';
14 static constexpr auto BARRIER2 =
'-';
15 static constexpr auto CORNER =
'+';
21 WAVEFRONT_OBJECT_FILE = 2,
31 static std::string to_string_from_outputs(
output o) {
33 case output::PLAIN_TEXT:
37 case output::WAVEFRONT_OBJECT_FILE:
46 throw std::invalid_argument(
"Invalid output: " + std::to_string(
static_cast<unsigned int>(o)));
53 static output to_output_from_string(
const std::string& o) {
54 if (o.compare(
"txt") == 0) {
55 return output::PLAIN_TEXT;
56 }
else if (o.compare(
"text") == 0) {
57 return output::PLAIN_TEXT;
58 }
else if (o.compare(
"json") == 0) {
60 }
else if (o.compare(
"obj") == 0) {
61 return output::WAVEFRONT_OBJECT_FILE;
62 }
else if (o.compare(
"object") == 0) {
63 return output::WAVEFRONT_OBJECT_FILE;
64 }
else if (o.compare(
"png") == 0) {
66 }
else if (o.compare(
"jpeg") == 0) {
68 }
else if (o.compare(
"jpg") == 0) {
70 }
else if (o.compare(
"stdout") == 0) {
71 return output::STDOUT;
73 throw std::invalid_argument(
"Invalid output: " + o);
78 enum class algo :
unsigned int {
88 static std::string to_string_from_algo(
algo a) {
90 case algo::BINARY_TREE:
92 case algo::SIDEWINDER:
97 throw std::invalid_argument(
"Invalid algo: " + std::to_string(
static_cast<unsigned int>(a)));
104 static algo to_algo_from_string(
const std::string& a) {
105 if (a.compare(
"binary_tree") == 0) {
106 return algo::BINARY_TREE;
107 }
else if (a.compare(
"sidewinder") == 0) {
108 return algo::SIDEWINDER;
109 }
else if (a.compare(
"dfs") == 0) {
112 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:18
algo
Enum class for maze types by the generating algorithm.
Definition enums.h:78