aboutsummaryrefslogtreecommitdiff
path: root/cpp/examples/move_convert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/move_convert.cpp')
-rw-r--r--cpp/examples/move_convert.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/cpp/examples/move_convert.cpp b/cpp/examples/move_convert.cpp
deleted file mode 100644
index 11398df..0000000
--- a/cpp/examples/move_convert.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
1/* A simple example showing how to move a cube and print it in H48 format. */
2
3#include "../nissy.h"
4#include <iostream>
5
6int main() {
7 nissy::cube c;
8 if (!c.move("R' U' F").ok()) {
9 std::cout << "Error moving the cube!" << std::endl;
10 return 1;
11 }
12
13 auto string_or_error = c.to_string("H48");
14 if (std::holds_alternative<nissy::error>(string_or_error)) {
15 std::cout << "Error converting cube!" << std::endl;
16 return 1;
17 }
18
19 auto str = std::get<std::string>(string_or_error);
20 std::cout << "Cube in H48 format after R' U' F:" << std::endl
21 << str << std::endl;
22
23 return 0;
24}

Generated with cgit - Back to sebastiano.tronto.net