diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-09 18:11:23 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-09 18:11:23 +0100 |
| commit | 4d0e55e9def2ba1eaca5b2289ca5b30e951f4d97 (patch) | |
| tree | c8e025c68400df1ef4947989462242d3229c4ffb | |
| parent | ba75d1632115180d05ba9ce5e35380251d251e7d (diff) | |
| download | nissy-core-4d0e55e9def2ba1eaca5b2289ca5b30e951f4d97.tar.gz nissy-core-4d0e55e9def2ba1eaca5b2289ca5b30e951f4d97.zip | |
Temporary fix for tools
| -rw-r--r-- | TODO_COORDINATES | 3 | ||||
| -rw-r--r-- | tools/300_solve_small/solve_small.c | 2 | ||||
| -rw-r--r-- | tools/301_solve_file/solve_file.c | 2 | ||||
| -rw-r--r-- | tools/302_solve_multisol/solve_multisol.c | 2 | ||||
| -rw-r--r-- | tools/400_solvetest/solve_test.c | 4 |
5 files changed, 7 insertions, 6 deletions
diff --git a/TODO_COORDINATES b/TODO_COORDINATES index 1c50db3..3bb516c 100644 --- a/TODO_COORDINATES +++ b/TODO_COORDINATES | |||
| @@ -4,11 +4,12 @@ | |||
| 4 | - fix | 4 | - fix |
| 5 | - h48 solve dispatch: move "h7k2" part to "options"? | 5 | - h48 solve dispatch: move "h7k2" part to "options"? |
| 6 | - it makes sense, but breaks the rule "solver == table" | 6 | - it makes sense, but breaks the rule "solver == table" |
| 7 | - if so, adjust tools that use nissy_solve() | ||
| 7 | - add new parameter to solve(): options (char *) | 8 | - add new parameter to solve(): options (char *) |
| 8 | - fix all usages | 9 | - fix all usages |
| 9 | x tests | 10 | x tests |
| 10 | x shell | 11 | x shell |
| 11 | - tools (after deciding if refactoring h48 solve dispatch) | 12 | x tools |
| 12 | x python bindings | 13 | x python bindings |
| 13 | - document what to do when changing interface? | 14 | - document what to do when changing interface? |
| 14 | - where do I document which solvers take which parameters? | 15 | - where do I document which solvers take which parameters? |
diff --git a/tools/300_solve_small/solve_small.c b/tools/300_solve_small/solve_small.c index 073de89..1a2f034 100644 --- a/tools/300_solve_small/solve_small.c +++ b/tools/300_solve_small/solve_small.c | |||
| @@ -36,7 +36,7 @@ void run(void) { | |||
| 36 | printf("Invalid scramble\n"); | 36 | printf("Invalid scramble\n"); |
| 37 | continue; | 37 | continue; |
| 38 | } | 38 | } |
| 39 | n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, | 39 | n = nissy_solve(cube, solver, "", NISSY_NISSFLAG_NORMAL, |
| 40 | 0, 20, 1, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); | 40 | 0, 20, 1, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); |
| 41 | if (n == 0) | 41 | if (n == 0) |
| 42 | printf("No solution found\n"); | 42 | printf("No solution found\n"); |
diff --git a/tools/301_solve_file/solve_file.c b/tools/301_solve_file/solve_file.c index fe41bb7..877be96 100644 --- a/tools/301_solve_file/solve_file.c +++ b/tools/301_solve_file/solve_file.c | |||
| @@ -23,7 +23,7 @@ void run(void) { | |||
| 23 | printf("Invalid scramble\n"); | 23 | printf("Invalid scramble\n"); |
| 24 | continue; | 24 | continue; |
| 25 | } | 25 | } |
| 26 | nsols = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, | 26 | nsols = nissy_solve(cube, solver, "", NISSY_NISSFLAG_NORMAL, |
| 27 | 0, 20, 1, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); | 27 | 0, 20, 1, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); |
| 28 | if (nsols == 0) | 28 | if (nsols == 0) |
| 29 | printf("No solution found\n"); | 29 | printf("No solution found\n"); |
diff --git a/tools/302_solve_multisol/solve_multisol.c b/tools/302_solve_multisol/solve_multisol.c index a03c2a0..7db2738 100644 --- a/tools/302_solve_multisol/solve_multisol.c +++ b/tools/302_solve_multisol/solve_multisol.c | |||
| @@ -29,7 +29,7 @@ void run(void) { | |||
| 29 | printf("Invalid scramble\n"); | 29 | printf("Invalid scramble\n"); |
| 30 | continue; | 30 | continue; |
| 31 | } | 31 | } |
| 32 | n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, | 32 | n = nissy_solve(cube, solver, "", NISSY_NISSFLAG_NORMAL, |
| 33 | 0, 20, nsol, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); | 33 | 0, 20, nsol, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); |
| 34 | if (n == 0) | 34 | if (n == 0) |
| 35 | printf("No solution found\n"); | 35 | printf("No solution found\n"); |
diff --git a/tools/400_solvetest/solve_test.c b/tools/400_solvetest/solve_test.c index 9b6c094..d4d5c68 100644 --- a/tools/400_solvetest/solve_test.c +++ b/tools/400_solvetest/solve_test.c | |||
| @@ -57,7 +57,7 @@ void run(void) { | |||
| 57 | printf("Invalid scramble\n"); | 57 | printf("Invalid scramble\n"); |
| 58 | continue; | 58 | continue; |
| 59 | } | 59 | } |
| 60 | n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, | 60 | n = nissy_solve(cube, solver, "", NISSY_NISSFLAG_NORMAL, |
| 61 | 0, 20, 1, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); | 61 | 0, 20, 1, -1, 0, size, buf, SOL_BUFFER_LEN, sol, stats); |
| 62 | if (n == 0) { | 62 | if (n == 0) { |
| 63 | printf("Error: no solution\n"); | 63 | printf("Error: no solution\n"); |
| @@ -78,7 +78,7 @@ void run(void) { | |||
| 78 | printf("Invalid scramble\n"); | 78 | printf("Invalid scramble\n"); |
| 79 | continue; | 79 | continue; |
| 80 | } | 80 | } |
| 81 | n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, | 81 | n = nissy_solve(cube, solver, "", NISSY_NISSFLAG_NORMAL, |
| 82 | 0, 20, 100, 0, 0, size, buf, SOL_BUFFER_LEN, sol, stats); | 82 | 0, 20, 100, 0, 0, size, buf, SOL_BUFFER_LEN, sol, stats); |
| 83 | if (check_all(sol, s[i].solutions)) { | 83 | if (check_all(sol, s[i].solutions)) { |
| 84 | printf("All solutions are correct\n"); | 84 | printf("All solutions are correct\n"); |
