fixedDepthSearcher.cc
Go to the documentation of this file.
00001 /* fixedDepthSearcher.cc
00002  */
00003 #include "osl/checkmate/fixedDepthSearcher.h"
00004 #include "osl/checkmate/fixedDepthSearcher.tcc"
00005 #include "osl/state/numEffectState.tcc"
00006 
00007 const osl::checkmate::ProofDisproof 
00008 osl::checkmate::FixedDepthSearcher::
00009 hasCheckmateMoveOfTurn(int depth, Move& best_move, PieceStand& proof_pieces)
00010 {
00011   if (state->turn() == BLACK)
00012     return hasCheckmateMove<BLACK>(depth, best_move, proof_pieces);
00013   else
00014     return hasCheckmateMove<WHITE>(depth, best_move, proof_pieces);
00015 }
00016 
00017 const osl::checkmate::ProofDisproof 
00018 osl::checkmate::FixedDepthSearcher::
00019 hasCheckmateMoveOfTurn(int depth, Move& best_move)
00020 {
00021   if (state->turn() == BLACK)
00022     return hasCheckmateMove<BLACK>(depth, best_move);
00023   else
00024     return hasCheckmateMove<WHITE>(depth, best_move);
00025 }
00026 
00027 const osl::checkmate::ProofDisproof 
00028 osl::checkmate::FixedDepthSearcher::
00029 hasCheckmateWithGuideOfTurn(int depth, Move& guide, PieceStand& proof_pieces)
00030 {
00031   if (state->turn() == BLACK)
00032     return hasCheckmateWithGuide<BLACK>(depth, guide, proof_pieces);
00033   else
00034     return hasCheckmateWithGuide<WHITE>(depth, guide, proof_pieces);
00035 }
00036 
00037 const osl::checkmate::ProofDisproof 
00038 osl::checkmate::FixedDepthSearcher::
00039 hasEscapeMoveOfTurn(Move last_move, int depth)
00040 {
00041   if (state->turn() == BLACK)
00042     return hasEscapeMove<BLACK>(last_move, depth);
00043   else
00044     return hasEscapeMove<WHITE>(last_move, depth);
00045 }
00046 
00047 const osl::checkmate::ProofDisproof 
00048 osl::checkmate::FixedDepthSearcher::
00049 hasEscapeByMoveOfTurn(Move next_move, int depth, 
00050                       Move& check_move, PieceStand& proof_pieces)
00051 {
00052   if (state->turn() == BLACK)
00053     return hasEscapeByMove<WHITE>(next_move, depth, check_move, proof_pieces);
00054   else
00055     return hasEscapeByMove<BLACK>(next_move, depth, check_move, proof_pieces);
00056 }
00057 
00058 const osl::checkmate::ProofDisproof 
00059 osl::checkmate::FixedDepthSearcher::
00060 hasEscapeByMoveOfTurn(Move next_move, int depth)
00061 {
00062   if (state->turn() == BLACK)
00063     return hasEscapeByMove<WHITE>(next_move, depth);
00064   else
00065     return hasEscapeByMove<BLACK>(next_move, depth);
00066 }
00067 
00068 /* ------------------------------------------------------------------------- */
00069 // ;;; Local Variables:
00070 // ;;; mode:c++
00071 // ;;; c-basic-offset:2
00072 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines