aboutsummaryrefslogtreecommitdiff
path: root/src/nissy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nissy.c')
-rw-r--r--src/nissy.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nissy.c b/src/nissy.c
index 27f2b35..f1d4cd1 100644
--- a/src/nissy.c
+++ b/src/nissy.c
@@ -461,7 +461,6 @@ nissy_solve(
461) 461)
462{ 462{
463 oriented_cube_t oc; 463 oriented_cube_t oc;
464 cube_t c;
465 long long parse_ret; 464 long long parse_ret;
466 uint8_t h, k; 465 uint8_t h, k;
467 int t; 466 int t;
@@ -472,7 +471,6 @@ nissy_solve(
472 } 471 }
473 472
474 oc = readcube(cube); 473 oc = readcube(cube);
475 c = oc.cube;
476 474
477/* TODO: solve should handle oriented cubes */ 475/* TODO: solve should handle oriented cubes */
478 476
@@ -481,12 +479,6 @@ nissy_solve(
481 return NISSY_ERROR_INVALID_CUBE; 479 return NISSY_ERROR_INVALID_CUBE;
482 } 480 }
483 481
484 if (!issolvable((oriented_cube_t){ .cube = c, .orientation = 0})) {
485/* TODO: this is step-dependent */
486 LOG("[solve] Error: cube is not solvable\n");
487 return NISSY_ERROR_UNSOLVABLE_CUBE;
488 }
489
490/* TODO: checks for minmoves, maxmoves, nissflag */ 482/* TODO: checks for minmoves, maxmoves, nissflag */
491 483
492 if (maxsols == 0) { 484 if (maxsols == 0) {
@@ -509,10 +501,10 @@ nissy_solve(
509 parse_ret = parse_h48_solver(solver, &h, &k); 501 parse_ret = parse_h48_solver(solver, &h, &k);
510 if (parse_ret != NISSY_OK) 502 if (parse_ret != NISSY_OK)
511 return parse_ret; 503 return parse_ret;
512 return solve_h48(c, minmoves, maxmoves, maxsols, 504 return solve_h48(oc, minmoves, maxmoves, maxsols,
513 optimal, t, data_size, data, sols_size, sols, stats); 505 optimal, t, data_size, data, sols_size, sols, stats);
514 } else if (!strncmp(solver, "coord_", 6)) { 506 } else if (!strncmp(solver, "coord_", 6)) {
515 return solve_coord_dispatch(c, solver + 6, nissflag, 507 return solve_coord_dispatch(oc, solver + 6, nissflag,
516 minmoves, maxmoves, maxsols, optimal, t, data_size, data, 508 minmoves, maxmoves, maxsols, optimal, t, data_size, data,
517 sols_size, sols); 509 sols_size, sols);
518 } else { 510 } else {

Generated with cgit - Back to sebastiano.tronto.net