immediateCheckmate.h
Go to the documentation of this file.
00001 /* immediateCheckmate.h
00002  */
00003 #ifndef _CHECKMATE_IMMEDIATE_CHECKMATE_H
00004 #define _CHECKMATE_IMMEDIATE_CHECKMATE_H
00005 #include "osl/checkmate/king8Info.h"
00006 #include "osl/state/numEffectState.h"
00007 #include "osl/move.h"
00008 
00009 namespace osl
00010 {
00011   namespace checkmate
00012   {
00013     class ImmediateCheckmate
00014     {
00015     private:
00016       template<Player P,bool setBestMove>
00017       static bool hasCheckmateDrop(NumEffectState const& state,Square target,
00018                                    King8Info mask,Move& bestMove);
00019 
00020     public:
00021       template<Player P,bool setBestMove>
00022       static bool slowHasCheckmateMoveDirPiece(NumEffectState const& state,Square target,
00023                                                King8Info mask,Direction d,Square pos,Piece p,Ptype ptype,Move& bestMove);
00024 
00025       template<Player P,bool setBestMove>
00026       static bool hasCheckmateMoveDirPiece(NumEffectState const& state,Square target,
00027                                            King8Info mask,Direction d,Square pos,Piece p,Move& bestMove);
00028 
00029       template<Player P,bool setBestMove>
00030       static bool hasCheckmateMoveDir(NumEffectState const& state,Square target,
00031                                       King8Info mask,Direction d,Move& bestMove);
00032 
00033       template<Player P,bool setBestMove>
00034       static bool hasCheckmateMove(NumEffectState const& state,Square target,
00035                                    King8Info mask,Move& bestMove);
00036 
00045       template<Player P>
00046       static bool hasCheckmateMove(NumEffectState const& state);
00047       template<Player P>
00048       static bool hasCheckmateMove(NumEffectState const& state, King8Info);
00049 
00059       template<Player P>
00060       static bool hasCheckmateMove(NumEffectState const& state,Move &bestMove);
00061       template<Player P>
00062       static bool hasCheckmateMove(NumEffectState const& state, 
00063                                    King8Info canMoveMask,
00064                                    Square king, Move& bestMove);
00068       static bool hasCheckmateMove(Player pl,NumEffectState const& state);
00069       static bool hasCheckmateMove(Player pl,NumEffectState const& state,Move& bestMove);
00070 
00071     };
00072   } // namespace checkmate
00073   using checkmate::ImmediateCheckmate;
00074 } // namespace osl
00075 #endif /* _CHECKMATE_IMMEDIATE_CHECKMATE_H */
00076 // ;;; Local Variables:
00077 // ;;; mode:c++
00078 // ;;; c-basic-offset:2
00079 // ;;; End:
00080 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines