fixedDepthSearcher.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fixedDepthSearcher.cc
Go to the documentation of this file.
1 /* fixedDepthSearcher.cc
2 */
3 #include "osl/checkmate/fixedDepthSearcher.h"
4 #include "osl/checkmate/fixedDepthSearcher.tcc"
5 #include "osl/state/numEffectState.tcc"
6
7 const osl::checkmate::ProofDisproof
8 osl::checkmate::FixedDepthSearcher::
9 hasCheckmateMoveOfTurn(int depth, Move& best_move, PieceStand& proof_pieces)
10 {
11 if (state->turn() == BLACK)
12 return hasCheckmateMove<BLACK>(depth, best_move, proof_pieces);
13 else
14 return hasCheckmateMove<WHITE>(depth, best_move, proof_pieces);
15 }
16
17 const osl::checkmate::ProofDisproof
18 osl::checkmate::FixedDepthSearcher::
19 hasCheckmateMoveOfTurn(int depth, Move& best_move)
20 {
21 if (state->turn() == BLACK)
22 return hasCheckmateMove<BLACK>(depth, best_move);
23 else
24 return hasCheckmateMove<WHITE>(depth, best_move);
25 }
26
27 const osl::checkmate::ProofDisproof
28 osl::checkmate::FixedDepthSearcher::
29 hasCheckmateWithGuideOfTurn(int depth, Move& guide, PieceStand& proof_pieces)
30 {
31 if (state->turn() == BLACK)
32 return hasCheckmateWithGuide<BLACK>(depth, guide, proof_pieces);
33 else
34 return hasCheckmateWithGuide<WHITE>(depth, guide, proof_pieces);
35 }
36
37 const osl::checkmate::ProofDisproof
38 osl::checkmate::FixedDepthSearcher::
39 hasEscapeMoveOfTurn(Move last_move, int depth)
40 {
41 if (state->turn() == BLACK)
42 return hasEscapeMove<BLACK>(last_move, depth);
43 else
44 return hasEscapeMove<WHITE>(last_move, depth);
45 }
46
47 const osl::checkmate::ProofDisproof
48 osl::checkmate::FixedDepthSearcher::
49 hasEscapeByMoveOfTurn(Move next_move, int depth,
50 Move& check_move, PieceStand& proof_pieces)
51 {
52 if (state->turn() == BLACK)
53 return hasEscapeByMove<WHITE>(next_move, depth, check_move, proof_pieces);
54 else
55 return hasEscapeByMove<BLACK>(next_move, depth, check_move, proof_pieces);
56 }
57
58 const osl::checkmate::ProofDisproof
59 osl::checkmate::FixedDepthSearcher::
60 hasEscapeByMoveOfTurn(Move next_move, int depth)
61 {
62 if (state->turn() == BLACK)
63 return hasEscapeByMove<WHITE>(next_move, depth);
64 else
65 return hasEscapeByMove<BLACK>(next_move, depth);
66 }
67
68 /* ------------------------------------------------------------------------- */
69 // ;;; Local Variables:
70 // ;;; mode:c++
71 // ;;; c-basic-offset:2
72 // ;;; End: