aboutsummaryrefslogtreecommitdiff
path: root/cpp/examples/move.cpp
blob: 970a65dac7c30b9a3a185866dc433fd1578eedc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* A simple example showing how to move a cube and print it in H48 format. */

#include "../nissy.h"
#include <iostream>

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;
}

Generated with cgit - Back to sebastiano.tronto.net