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