diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 21:37:34 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 21:37:34 +0100 |
| commit | 3568412f8f230774d0d11d7ed1c897424f95d3ef (patch) | |
| tree | 77223792d8c925a9b1fc32b3f4341e943b5f8209 /old/2021-06-02-cleanedup/main.c | |
| parent | 67e1b5e6e6a2c917a2fe58a37a1382c982b1e5c5 (diff) | |
| download | nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.tar.gz nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.zip | |
Rewritten from scratch. Welocme nissy 2.0!
Diffstat (limited to '')
| -rw-r--r-- | old/2021-06-02-cleanedup/main.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/old/2021-06-02-cleanedup/main.c b/old/2021-06-02-cleanedup/main.c new file mode 100644 index 0000000..fca5e3c --- /dev/null +++ b/old/2021-06-02-cleanedup/main.c | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | #include "cube.h" | ||
| 3 | #include "steps.h" | ||
| 4 | |||
| 5 | int main() { | ||
| 6 | Alg algo; | ||
| 7 | AlgList *sols; | ||
| 8 | Cube cube; | ||
| 9 | SolveOptions opts; | ||
| 10 | |||
| 11 | init(); | ||
| 12 | |||
| 13 | algo = new_alg("R U R' F"); | ||
| 14 | cube = apply_alg(algo, (Cube){0}); | ||
| 15 | |||
| 16 | print_cube(apply_trans(rd, cube)); | ||
| 17 | |||
| 18 | opts = (SolveOptions) { | ||
| 19 | .min_moves = 0, | ||
| 20 | .max_moves = 5, | ||
| 21 | .optimal_only = true, | ||
| 22 | .max_solutions = 3, | ||
| 23 | .can_niss = false, | ||
| 24 | .moveset = standard_moveset, | ||
| 25 | .pre_trans = fu | ||
| 26 | }; | ||
| 27 | sols = solve(cube, step_eofb, opts); | ||
| 28 | if (sols->len == 0) | ||
| 29 | fprintf(stderr, "No solution found\n"); | ||
| 30 | else | ||
| 31 | print_alg(sols->first->alg); | ||
| 32 | |||
| 33 | |||
| 34 | return 0; | ||
| 35 | } | ||
