예제 #1
0
파일: fork.c 프로젝트: thomas-maeder/popeye
/* Delegate generating to next2
 * @param si identifies the fork
 */
void fork_move_generation_delegate(slice_index si)
{
  TraceFunctionEntry(__func__);
  TraceFunctionParam("%u",si);
  TraceFunctionParamListEnd();

  generate_moves_delegate(SLICE_NEXT2(si));

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
예제 #2
0
/* Initiate the generation of moves for the piece occupying a specific square
 * @param sq_departure square occupied by the piece for which to generate moves
 */
void generate_moves_for_piece(square sq_departure)
{
  TraceFunctionEntry(__func__);
  TraceSquare(sq_departure);
  TraceFunctionParamListEnd();

  curr_generation->departure = sq_departure;
  move_generation_current_walk = get_walk_of_piece_on_square(sq_departure);
  generate_moves_delegate(SLICE_NEXT2(temporary_hack_move_generator[trait[nbply]]));

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}
예제 #3
0
/* Generate moves for the current piece, but based on a different walk
 * @param si identifies the generator slices
 * @param walk the basis to be used for the move generation
 */
void generate_moves_different_walk(slice_index si, piece_walk_type walk)
{
  piece_walk_type const save_current_walk = move_generation_current_walk;

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

  move_generation_current_walk = walk;
  generate_moves_delegate(si);
  move_generation_current_walk = save_current_walk;

  TraceFunctionExit(__func__);
  TraceFunctionResultEnd();
}