static void generate_one_dir(piece_walk_type part, move_filter_criterion_type criterion) { numecoup const savenbcou = CURRMOVE_OF_PLY(nbply); move_generation_current_walk = part; generate_moves_for_piece_based_on_walk(); move_generator_filter_moves(savenbcou,criterion); }
/* 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 bgl_enforcer_solve(slice_index si) { TraceFunctionEntry(__func__); TraceFunctionParam("%u",si); TraceFunctionParamListEnd(); move_generator_filter_moves(MOVEBASE_OF_PLY(nbply),&is_move_within_bounds); pipe_solve_delegate(si); TraceFunctionExit(__func__); TraceFunctionResultEnd(); }
/* 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 grid_remove_illegal_moves_solve(slice_index si) { TraceFunctionEntry(__func__); TraceFunctionParam("%u",si); TraceFunctionParamListEnd(); move_generator_filter_moves(MOVEBASE_OF_PLY(nbply),&is_not_in_same_cell); pipe_solve_delegate(si); TraceFunctionExit(__func__); TraceFunctionResultEnd(); }
/* Remove duplicate moves generated for a single piece. * @param last_move_of_prev_piece index of last move of previous piece */ void remove_duplicate_moves_of_single_piece(numecoup last_move_of_prev_piece) { if (current_mark==UINT_MAX) { square i; for (i = square_a1; i!=square_h8; ++i) square_marks[i] = 0; current_mark = 1; } else ++current_mark; move_generator_filter_moves(last_move_of_prev_piece,&is_not_duplicate); }