blob: fca5e3c693091f91c9d7e8f8222151f7ae3e04d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <stdio.h>
#include "cube.h"
#include "steps.h"
int main() {
Alg algo;
AlgList *sols;
Cube cube;
SolveOptions opts;
init();
algo = new_alg("R U R' F");
cube = apply_alg(algo, (Cube){0});
print_cube(apply_trans(rd, cube));
opts = (SolveOptions) {
.min_moves = 0,
.max_moves = 5,
.optimal_only = true,
.max_solutions = 3,
.can_niss = false,
.moveset = standard_moveset,
.pre_trans = fu
};
sols = solve(cube, step_eofb, opts);
if (sols->len == 0)
fprintf(stderr, "No solution found\n");
else
print_alg(sols->first->alg);
return 0;
}
|