From 8b72e391c7185e3da0dfbf0ab60068ac37e4d5cc Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 22 Apr 2025 09:00:15 +0200 Subject: Removed old scripts and updated public API --- cpp/examples/move.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cpp/examples/move.cpp (limited to 'cpp/examples/move.cpp') diff --git a/cpp/examples/move.cpp b/cpp/examples/move.cpp new file mode 100644 index 0000000..970a65d --- /dev/null +++ b/cpp/examples/move.cpp @@ -0,0 +1,17 @@ +/* A simple example showing how to move a cube and print it in H48 format. */ + +#include "../nissy.h" +#include + +int main() { + nissy::cube c; + if (!c.move("R' U' F").ok()) { + std::cout << "Error moving the cube!" << std::endl; + return 1; + } + + auto str = c.to_string(); + std::cout << "Cube after R' U' F:" << std::endl << str << std::endl; + + return 0; +} -- cgit v1.3