All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fixedDepthSearcher2.cc
Go to the documentation of this file.
1 /* fixedDepthSearcher2.cc
2  */
6 
9 hasCheckmateMoveOfTurn(int depth, Move& best_move, PieceStand& proof_pieces)
10 {
11  NumEffectState* state= &states[depth];
12  if (state->turn() == BLACK)
13  return hasCheckmateMove<BLACK>(depth, best_move, proof_pieces);
14  else
15  return hasCheckmateMove<WHITE>(depth, best_move, proof_pieces);
16 }
17 
21 {
22  NumEffectState* state= &states[depth];
23  if (state->turn() == BLACK)
24  return hasCheckmateMove<BLACK>(depth, best_move);
25  else
26  return hasCheckmateMove<WHITE>(depth, best_move);
27 }
28 
31 hasCheckmateWithGuideOfTurn(int depth, Move& guide, PieceStand& proof_pieces)
32 {
33  NumEffectState* state= &states[depth];
34  if (state->turn() == BLACK)
35  return hasCheckmateWithGuide<BLACK>(depth, guide, proof_pieces);
36  else
37  return hasCheckmateWithGuide<WHITE>(depth, guide, proof_pieces);
38 }
39 
43 {
44  NumEffectState* state= &states[depth];
45  if (state->turn() == BLACK)
46  return hasEscapeMove<BLACK>(last_move, depth);
47  else
48  return hasEscapeMove<WHITE>(last_move, depth);
49 }
50 
54  Move& check_move, PieceStand& proof_pieces)
55 {
56  NumEffectState* state= &states[depth];
57  if (state->turn() == BLACK)
58  return hasEscapeByMove<WHITE>(next_move, depth, check_move, proof_pieces);
59  else
60  return hasEscapeByMove<BLACK>(next_move, depth, check_move, proof_pieces);
61 }
62 
66 {
67  NumEffectState* state= &states[depth];
68  if (state->turn() == BLACK)
69  return hasEscapeByMove<WHITE>(next_move, depth);
70  else
71  return hasEscapeByMove<BLACK>(next_move, depth);
72 }
73 
74 /* ------------------------------------------------------------------------- */
75 // ;;; Local Variables:
76 // ;;; mode:c++
77 // ;;; c-basic-offset:2
78 // ;;; End: