00001
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,Position target,
00018 King8Info mask,Move& bestMove);
00019
00020 public:
00021 template<Player P,bool setBestMove>
00022 static bool slowHasCheckmateMoveDirPiece(NumEffectState const& state,Position target,
00023 King8Info mask,Direction d,Position pos,Piece p,Ptype ptype,Move& bestMove);
00024
00025 template<Player P,bool setBestMove>
00026 static bool hasCheckmateMoveDirPiece(NumEffectState const& state,Position target,
00027 King8Info mask,Direction d,Position pos,Piece p,Move& bestMove);
00028
00029 template<Player P,bool setBestMove>
00030 static bool hasCheckmateMoveDir(NumEffectState const& state,Position target,
00031 King8Info mask,Direction d,Move& bestMove);
00032
00033 template<Player P,bool setBestMove>
00034 static bool hasCheckmateMove(NumEffectState const& state,Position 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 Position 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 }
00073 using checkmate::ImmediateCheckmate;
00074 }
00075 #endif
00076
00077
00078
00079
00080