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

Generated with cgit - Back to sebastiano.tronto.net