aboutsummaryrefslogtreecommitdiff
path: root/old/2021-02-28-transformcube-works/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--old/2021-02-28-transformcube-works/src/main.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/old/2021-02-28-transformcube-works/src/main.c b/old/2021-02-28-transformcube-works/src/main.c
new file mode 100644
index 0000000..56f3f3b
--- /dev/null
+++ b/old/2021-02-28-transformcube-works/src/main.c
@@ -0,0 +1,57 @@
1#include <stdio.h>
2#include "cube.h"
3#include "moves.h"
4#include "solve.h"
5#include "transformations.h"
6
7int main() {
8 init_ttables(true, true);
9 init_aux_tables();
10 init_transformations(true, true);
11
12
13 /*char moves[100] = "MR U' B2 Bw F z xE2 M' x Dw' y Fw2";*/
14
15 /*char moves[100] = "M'U2MU2";*/
16 char moves[100] = "R' D2 F2 U2 R F2 R D2 L' R2 D2 F D' L' U' B R' D' U R' B";
17 NissMove alg[100];
18 read_moves(moves, alg, 100);
19 Cube cube = apply_alg(alg, (Cube){0});
20 print_cube(cube);
21 cube = transform_cube(rd, cube);
22 print_cube(cube);
23
24 /*f_eofb(cube);*/
25
26
27 /*
28 SolveData d = { .optimal_only = true, .available = standard_moveset,
29 .max_moves = 10,
30 .cleanup = true,
31 .max_solutions = 10,
32 .f = f_eofb };
33 read_moves("y", d.pre_rotation, 2);
34 int n = solve(cube, &d);
35 printf("%d solutions found:\n", n);
36 for (int i = 0; i < n; i++)
37 print_moves(d.solutions[i]);
38 */
39
40/*
41 NissMove a[5], b[5];
42 read_moves("R", a, 5);
43 read_moves("U", b, 5);
44 Cube c1 = apply_alg(a,(Cube){0}), c2 = apply_alg(b,(Cube){0});
45 print_cube(compose(c2,c1));
46 print_cube(compose(c1,c2));
47
48 NissMove nm[10];
49 read_moves("y(y)RU", nm, 10);
50
51 print_moves(nm);
52 cleanup(nm, 10);
53 print_moves(nm);
54 */
55
56 return 0;
57}

Generated with cgit - Back to sebastiano.tronto.net