fixedDepthSearcher2.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fixedDepthSearcher2.cc
Go to the documentation of this file.
1 /* fixedDepthSearcher2.cc
2 */
3 #include "osl/checkmate/fixedDepthSearcher2.h"
4 #include "osl/checkmate/fixedDepthSearcher2.tcc"
5 #include "osl/state/numEffectState.tcc"
6
7 const osl::checkmate::ProofDisproof
8 osl::checkmate::FixedDepthSearcher2::
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
18 const osl::checkmate::ProofDisproof
19 osl::checkmate::FixedDepthSearcher2::
20 hasCheckmateMoveOfTurn(int depth, Move& best_move)
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
29 const osl::checkmate::ProofDisproof
30 osl::checkmate::FixedDepthSearcher2::
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
40 const osl::checkmate::ProofDisproof
41 osl::checkmate::FixedDepthSearcher2::
42 hasEscapeMoveOfTurn(Move last_move, int depth)
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
51 const osl::checkmate::ProofDisproof
52 osl::checkmate::FixedDepthSearcher2::
53 hasEscapeByMoveOfTurn(Move next_move, int depth,
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
63 const osl::checkmate::ProofDisproof
64 osl::checkmate::FixedDepthSearcher2::
65 hasEscapeByMoveOfTurn(Move next_move, int depth)
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: