• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pipe_solve_delegate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pipe_solve_delegate函数的典型用法代码示例。如果您正苦于以下问题:C++ pipe_solve_delegate函数的具体用法?C++ pipe_solve_delegate怎么用?C++ pipe_solve_delegate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pipe_solve_delegate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: marscirce_move_to_rebirth_square_solve

/* 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 marscirce_move_to_rebirth_square_solve(slice_index si)
{
  numecoup const curr = CURRMOVE_OF_PLY(nbply);
  move_generation_elmt * const move_gen_top = move_generation_stack+curr;
  numecoup const id = move_gen_top->id;
  square const sq_capture = move_gen_top->capture;

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  if (marscirce_rebirth_square[id]==initsquare
      /* marscirce_rebirth_square isn't set when castlings are generated */
      || (min_castling<=sq_capture && sq_capture<=max_castling))
  {
    move_effect_journal_do_null_effect();
    pipe_solve_delegate(si);
  }
  else
  {
    square const sq_departure = move_gen_top->departure;

    move_effect_journal_do_piece_movement(move_effect_reason_phantom_movement,
                                          sq_departure,marscirce_rebirth_square[id]);

    move_gen_top->departure = marscirce_rebirth_square[id];
    pipe_solve_delegate(si);
    move_gen_top->departure = sq_departure;
  }

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:46,代码来源:marscirce.c


示例2: singlebox_type2_latent_pawn_promoter_solve

/* 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 singlebox_type2_latent_pawn_promoter_solve(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  if (post_move_iteration_id[nbply]!=prev_post_move_iteration_id_promotion[nbply])
    init_latent_pawn_promotion();

  if (singlebox_type2_latent_pawn_promotions[nbply].promotion.promotee==Empty)
    pipe_solve_delegate(si);
  else
  {
    move_effect_journal_do_walk_change(move_effect_reason_singlebox_promotion,
                                        singlebox_type2_latent_pawn_promotions[nbply].where,
                                        singlebox_type2_latent_pawn_promotions[nbply].promotion.promotee);
    pipe_solve_delegate(si);

    if (!post_move_iteration_locked[nbply])
    {
      advance_latent_pawn_promotion();
      if (singlebox_type2_latent_pawn_promotions[nbply].promotion.promotee!=Empty)
        lock_post_move_iterations();
    }
  }

  prev_post_move_iteration_id_promotion[nbply] = post_move_iteration_id[nbply];

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:44,代码来源:type2.c


示例3: exclusive_chess_legality_tester_solve

/* 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 exclusive_chess_legality_tester_solve(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  if ((table_length(exclusive_chess_undecidable_continuations[parent_ply[nbply]])
       +exclusive_chess_nr_continuations_reaching_goal[parent_ply[nbply]])
      >1)
  {
    if (is_current_move_in_table(exclusive_chess_undecidable_continuations[parent_ply[nbply]]))
      solve_result = this_move_is_illegal;
    else
      switch (conditional_pipe_solve_delegate(temporary_hack_mate_tester[advers(trait[nbply])]))
      {
        case this_move_is_illegal:
          solve_result = this_move_is_illegal;
          break;

        case previous_move_has_not_solved:
          pipe_solve_delegate(si);
          break;

        default:
          solve_result = previous_move_has_solved;
          break;
      }
  }
  else
    pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:47,代码来源:exclusive.c


示例4: threat_enforcer_solve

/* 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 threat_enforcer_solve(slice_index si)
{
  ply const threats_ply = parent_ply[nbply];
  stip_length_type const len_threat = threat_lengths[threats_ply];

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  TraceValue("%u",len_threat);
  TraceEOL();

  if (len_threat<=slack_length)
    /* the move has something stronger than threats (typically, it
     * delivers check)
     */
    pipe_solve_delegate(si);
  else if (len_threat<=MOVE_HAS_SOLVED_LENGTH())
  {
    /* there are >=1 threats - don't report variations shorter than
     * the threats or variations that don't refute any threat
     */
    table const threats_table = threats[threats_ply];
    stip_length_type len_test_threats;

    nr_threats_to_be_confirmed = table_length(threats_table);

    len_test_threats = testing_pipe_solve_delegate(si,len_threat);

    if (len_test_threats>len_threat)
      /* variation is longer than threat */
      pipe_solve_delegate(si);
    else if (len_test_threats>len_threat-2 && nr_threats_to_be_confirmed>0)
      /* variation has same length as the threat(s), but it has
       * defeated at least one threat
       */
      pipe_solve_delegate(si);
    else
      /* variation is shorter than threat */
      solve_result = len_test_threats;
  }
  else
    /* zugzwang, or we haven't looked for threats yet */
    pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:61,代码来源:threat.c


示例5: singlebox_type2_latent_pawn_selector_solve

/* 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 singlebox_type2_latent_pawn_selector_solve(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  if (post_move_iteration_id[nbply]!=prev_post_move_iteration_id_selection[nbply])
    init_latent_pawn_selection(SLICE_STARTER(si));

  pipe_solve_delegate(si);

  if (singlebox_type2_latent_pawn_promotions[nbply].where!=initsquare)
  {
    if (!post_move_iteration_locked[nbply])
    {
      advance_latent_pawn_selection(SLICE_STARTER(si));

      if (singlebox_type2_latent_pawn_promotions[nbply].where!=initsquare)
        lock_post_move_iterations();
    }
  }

  prev_post_move_iteration_id_selection[nbply] = post_move_iteration_id[nbply];

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:40,代码来源:type2.c


示例6: by_knight

static void by_knight(slice_index si,
                      unsigned int index_of_checker,
                      square const check_from)
{
  int const diff = being_solved.king_square[Black]-check_from;
  int const dir = CheckDir[Knight][diff];

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",index_of_checker);
  TraceSquare(check_from);
  TraceFunctionParamListEnd();

  if (dir!=0
      && intelligent_reserve_white_officer_moves_from_to_checking(white[index_of_checker].diagram_square,
                                                                  Knight,
                                                                  check_from))
  {
    occupy_square(check_from,Knight,white[index_of_checker].flags);
    init_disturb_mate_dir(check_from,being_solved.king_square[Black]-check_from);
    pipe_solve_delegate(si);
    fini_disturb_mate_dir();
    intelligent_unreserve();
  }

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:27,代码来源:generate_checking_moves.c


示例7: by_rider

static void by_rider(slice_index si,
                     unsigned int index_of_checker,
                     square const check_from)
{
  piece_walk_type const checker_type = white[index_of_checker].type;
  Flags const checker_flags = white[index_of_checker].flags;
  int const diff = being_solved.king_square[Black]-check_from;
  int const dir = CheckDir[checker_type][diff];

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",index_of_checker);
  TraceSquare(check_from);
  TraceFunctionParamListEnd();

  if (dir!=0
      && intelligent_reserve_white_officer_moves_from_to_checking(white[index_of_checker].diagram_square,
                                                                  checker_type,
                                                                  check_from))
  {
    occupy_square(check_from,checker_type,checker_flags);
    remember_mating_line(checker_type,check_from,+1);
    pipe_solve_delegate(si);
    remember_mating_line(checker_type,check_from,-1);
    intelligent_unreserve();
  }

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:29,代码来源:generate_checking_moves.c


示例8: by_unpromoted_pawn

static void by_unpromoted_pawn(slice_index si,
                               unsigned int index_of_checker,
                               square const check_from)
{
  square const checker_from = white[index_of_checker].diagram_square;
  Flags const checker_flags = white[index_of_checker].flags;
  SquareFlags const prom_square = BIT(WhPromSq)|BIT(BlPromSq);

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",index_of_checker);
  TraceSquare(check_from);
  TraceFunctionParamListEnd();

  if (!TSTFLAGMASK(sq_spec[check_from],prom_square)
      && GuardDir[Pawn-Pawn][check_from].dir==guard_dir_check_uninterceptable
      && intelligent_reserve_white_pawn_moves_from_to_checking(checker_from,check_from))
  {
    occupy_square(check_from,Pawn,checker_flags);
    init_disturb_mate_dir(check_from,being_solved.king_square[Black]-check_from);
    pipe_solve_delegate(si);
    fini_disturb_mate_dir();
    empty_square(check_from);
    intelligent_unreserve();
  }

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:28,代码来源:generate_checking_moves.c


示例9: output_plaintext_instrument_solving

/*
 *  Instrument the solving machinery with slices that write the solution in
 * plain text
 */
void output_plaintext_instrument_solving(slice_index si)
{
  stip_structure_traversal st;

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  TraceStipulation(si);

  stip_structure_traversal_init(&st,0);
  stip_structure_traversal_override_single(&st,
                                           STOutputModeSelector,
                                           &visit_output_mode_selector);
  stip_traverse_structure(si,&st);

  {
    slice_index const prototypes[] =
    {
        alloc_output_plaintext_end_of_phase_writer_slice()
    };
    enum
    {
      nr_prototypes = sizeof prototypes / sizeof prototypes[0]
    };
    slice_insertion_insert(si,prototypes,nr_prototypes);
  }

  solving_insert_move_inversion_counter_slices(si);

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:39,代码来源:plaintext.c


示例10: en_passant_redo_multistep

/* 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 en_passant_redo_multistep(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  assert(en_passant_nr_retro_squares>2);

  move_effect_journal_do_no_piece_removal();

  {
    unsigned int i;

    move_effect_journal_do_piece_movement(move_effect_reason_moving_piece_movement,
                                          en_passant_retro_squares[0],
                                          en_passant_retro_squares[en_passant_nr_retro_squares-1]);

    for (i = 1; i<en_passant_nr_retro_squares-1; ++i)
      en_passant_remember_multistep_over(en_passant_retro_squares[i]);
  }

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:39,代码来源:en_passant.c


示例11: mummer_orchestrator_solve

/* 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 mummer_orchestrator_solve(slice_index si)
{
  ply const save_nbply = nbply;

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  mum_length[parent_ply[nbply]] = INT_MIN;
  reset_accepted_moves(nbply);

  copyply();
  move_generator_invert_move_order(nbply);
  fork_solve_delegate(si);
  finply();

  /* in some very obscure situations (cf. bug #142), we would continue with
   * e.g. knight promotion if queen promotion was played while measuring lengths
   */
  ++post_move_iteration_id[nbply];

  nbply = save_nbply;
  SET_CURRMOVE(nbply,last_candidate[nbply]);

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:42,代码来源:mummer.c


示例12: hashtable_dimensioner_solve

void hashtable_dimensioner_solve(slice_index si)
{
  if (dimensionHashtable())
    pipe_solve_delegate(si);
  else
    fputs("Couldn't allocate the requested amount of memory\n",stdout);
}
开发者ID:ralphwaldo,项目名称:popeye,代码行数:7,代码来源:maxmem.c


示例13: delegate_solve

/* Delegate finding a solution to the next1 slice, gradually increasing
 * the number of allowed half-moves
 * @param si slice index of slice being solved
 * @param n maximum number of half moves until end state has to be reached
 * @param n_min minimum number of half-moves to try
 * @return length of solution found and written, i.e.:
 *            previous_move_is_illegal the move just played or being played is illegal
 *            <=n length of shortest solution found
 *            n+2 no solution found
 */
static stip_length_type delegate_solve(slice_index si,
                                        stip_length_type n,
                                        stip_length_type n_min)
{
  stip_length_type result = n+2;
  stip_length_type const save_solve_nr_remaining = MOVE_HAS_SOLVED_LENGTH();

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParam("%u",n_min);
  TraceFunctionParamListEnd();

  for (solve_nr_remaining = n_min+(n-n_min)%2; solve_nr_remaining<=n; solve_nr_remaining += 2)
  {
    pipe_solve_delegate(si);

  result = solve_result;
    if (result<=MOVE_HAS_SOLVED_LENGTH())
      break;
  }

  solve_nr_remaining = save_solve_nr_remaining;

  TraceFunctionExit(__func__);
  TraceFunctionResult("%u",result);
  TraceFunctionResultEnd();
  return result;
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:38,代码来源:degenerate_tree.c


示例14: opponent_moves_counter_solve

/* 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 opponent_moves_counter_solve(slice_index si)
{
  numecoup const move_id = move_generation_stack[CURRMOVE_OF_PLY(nbply)].id;

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  legal_move_count_init(UINT_MAX);

  pipe_solve_delegate(si);

  if (solve_result==this_move_is_illegal)
    /* Defenses leading to self check get a big count.
     * But still make sure that we can correctly compute the difference of two
     * counts.
     */
    opponent_moves_few_moves_prioriser_table[move_id] = INT_MAX/2;
  else
    opponent_moves_few_moves_prioriser_table[move_id] = legal_move_counter_count[nbply];

  legal_move_count_fini();

  solve_result = MOVE_HAS_SOLVED_LENGTH();

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:41,代码来源:opponent_moves_counter.c


示例15: continuation_solver_solve

/* 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 continuation_solver_solve(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  fork_solve_delegate(si);

  if (move_has_solved())
  {
#if !defined(NDEBUG)
    stip_length_type const test_result = solve_result;
#endif
    stip_length_type const save_solve_nr_remaining = solve_nr_remaining;

    if (solve_nr_remaining>solve_result)
      solve_nr_remaining = solve_result;
    pipe_solve_delegate(si);
    solve_nr_remaining = save_solve_nr_remaining;

    assert(solve_result==test_result);
  }

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:39,代码来源:continuation.c


示例16: orthodox_mating_king_contact_generator_solve

/* 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 orthodox_mating_king_contact_generator_solve(slice_index si)
{
  Side const moving = SLICE_STARTER(si);
  Side const mated = advers(moving);
  square const sq_mated_king = being_solved.king_square[mated];

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  assert(solve_nr_remaining==slack_length+1);

  curr_generation->departure = being_solved.king_square[moving];

  if (curr_generation->departure!=sq_mated_king)
  {
    vec_index_type k;
    for (k = vec_queen_start; k<=vec_queen_end; k++)
    {
      curr_generation->arrival = curr_generation->departure+vec[k];
      if ((is_square_empty(curr_generation->arrival)
          || TSTFLAG(being_solved.spec[curr_generation->arrival],mated))
          && move_diff_code[abs(sq_mated_king-curr_generation->arrival)]<=1+1)
        push_move();
    }
  }

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:45,代码来源:king_contact_move_generator.c


示例17: proof_verify_unique_goal_solve

/* verify that the proof or A=>B goal is unique
 * @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 proof_verify_unique_goal_solve(slice_index si)
{
  if (find_unique_goal(si).type==no_goal)
    output_plaintext_verifie_message(MultipleGoalsWithProofGameNotAcceptable);
  else
    pipe_solve_delegate(si);
}
开发者ID:Die9teWoge,项目名称:popeye,代码行数:20,代码来源:proofgames.c


示例18: half_neutral_recolorer_solve

/* 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 half_neutral_recolorer_solve(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  {
    move_effect_journal_index_type const base = move_effect_journal_base[nbply];
    move_effect_journal_index_type const movement = base+move_effect_journal_index_offset_movement;
    square const sq_arrival = move_effect_journal[movement].u.piece_movement.to;
    Flags const movingspec = move_effect_journal[movement].u.piece_movement.movingspec;
    PieceIdType const moving_id = GetPieceId(movingspec);
    square const pos = move_effect_journal_follow_piece_through_other_effects(nbply,
                                                                              moving_id,
                                                                              sq_arrival);

    if (TSTFLAG(movingspec,HalfNeutral))
    {
      if (is_piece_neutral(being_solved.spec[pos]))
        do_deneutralisation(pos,SLICE_STARTER(si));
      else
        do_neutralisation(pos);
    }
  }

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:43,代码来源:half.c


示例19: haunted_chess_ghost_rememberer_solve

/* 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 haunted_chess_ghost_rememberer_solve(slice_index si)
{
  move_effect_journal_index_type const top = move_effect_journal_base[nbply];
  move_effect_journal_index_type const capture = top+move_effect_journal_index_offset_capture;

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  if (move_effect_journal[capture].type!=move_effect_no_piece_removal)
  {
    square const sq_capture = move_generation_stack[CURRMOVE_OF_PLY(nbply)].capture;
    underworld_index_type const preempted_idx = underworld_find_last(sq_capture);

    if (preempted_idx!=ghost_not_found)
      move_effect_journal_do_forget_ghost(preempted_idx);

    move_effect_journal_do_remember_ghost();
  }

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:38,代码来源:haunted_chess.c


示例20: haunted_chess_ghost_summoner_solve

/* 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 haunted_chess_ghost_summoner_solve(slice_index si)
{
  underworld_index_type idx_ghost = nr_ghosts;

  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  while (idx_ghost>0)
  {
    --idx_ghost;
    if (is_square_empty(underworld[idx_ghost].on))
    {
      move_effect_journal_do_piece_readdition(move_effect_reason_summon_ghost,
                                              underworld[idx_ghost].on,
                                              underworld[idx_ghost].walk,
                                              underworld[idx_ghost].flags,
                                              no_side);

      move_effect_journal_do_forget_ghost(idx_ghost);
    }
  }

  pipe_solve_delegate(si);

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
开发者ID:thomas-maeder,项目名称:popeye,代码行数:41,代码来源:haunted_chess.c



注:本文中的pipe_solve_delegate函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pipe_surface_reference函数代码示例发布时间:2022-05-30
下一篇:
C++ pipe_sampler_view_reference函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap