From 5355de2921126e2b75e24abd57e17556e22a6ed0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 7 Aug 2025 15:09:46 +0200 Subject: Added API function for solution variations --- cpp/examples/variations.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cpp/examples/variations.cpp (limited to 'cpp/examples') diff --git a/cpp/examples/variations.cpp b/cpp/examples/variations.cpp new file mode 100644 index 0000000..3c6421d --- /dev/null +++ b/cpp/examples/variations.cpp @@ -0,0 +1,15 @@ +/* A simple example showing how to move a cube and print it in H48 format. */ + +#include "../nissy.h" +#include + +int main() { + std::string moves = "R U' Bw2 M D' x' F B(E2 F D B' Lw2 U2 U' S2 B)"; + auto v = std::get(nissy::variation::get("lastqt")); + auto variations = v.find_variations(moves).solutions; + + std::cout << "Changing the last quarter turn of " << moves << " gives:" + << std::endl << variations; + + return 0; +} -- cgit v1.3