Exemple #1
0
/* Try to solve in solve_nr_remaining half-moves.
 * @param si slice index
 * @note assigns solve_result the length of solution found and written, i.e.:
 *            previous_move_is_illegal the move just played is illegal
 *            this_move_is_illegal     the move being played is illegal
 *            immobility_on_next_move  the moves just played led to an
 *                                     unintended immobility on the next move
 *            <=n+1 length of shortest solution found (n+1 only if in next
 *                                     branch)
 *            n+2 no solution found in this branch
 *            n+3 no solution found in next branch
 *            (with n denominating solve_nr_remaining)
 */
void maxsolutions_guard_solve(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  pipe_this_move_doesnt_solve_if(si,max_nr_solutions_found_in_phase());

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
Exemple #2
0
/* Increase the number of found solutions by 1
 */
void increase_nr_found_solutions(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParamListEnd();

  ++nr_solutions_found_in_phase;
  TraceValue("->%u",nr_solutions_found_in_phase);
  TraceEOL();

  if (max_nr_solutions_found_in_phase())
    phase_solving_remember_incompleteness(si,solving_interrupted);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}