説明を見る。00001 #ifndef OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H
00002 #define OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H
00003 #include "osl/move_generator/move_action.h"
00004 #include "osl/numEffectState.h"
00005
00006 namespace osl
00007 {
00008 namespace move_generator
00009 {
00025 template<class Action>
00026 class AddEffectWithEffect
00027 {
00028 public:
00029 template<Player P,bool isAttackToKing>
00030 static void generate(const NumEffectState& state,Square target,Action& action,bool& hasPawnCheckmate);
00031 template<Player P,bool isAttackToKing>
00032 static void generate(const NumEffectState& state,Square target,Action& action){
00033 bool dummy;
00034 generate<P,isAttackToKing>(state,target,action,dummy);
00035 }
00036 };
00037 struct GenerateAddEffectWithEffect
00038 {
00043 template<bool isAttackToKing>
00044 static void generate(Player player, const NumEffectState& state, Square target,
00045 move_action::Store& store);
00046 template<bool isAttackToKing>
00047 static void generate(Player player,const NumEffectState& state,Square target,MoveVector& out, bool& has_pawn_checkmate) {
00048 move_action::Store store(out);
00049 if(player==BLACK)
00050 AddEffectWithEffect<move_action::Store>::template generate<BLACK,isAttackToKing>(state,target,store,has_pawn_checkmate);
00051 else
00052 AddEffectWithEffect<move_action::Store>::template generate<WHITE,isAttackToKing>(state,target,store,has_pawn_checkmate);
00053 }
00054 template<bool isAttackToKing>
00055 static void generate(Player player,const NumEffectState& state,Square target,MoveVector& out) {
00056 bool dummy;
00057 generate<isAttackToKing>(player,state,target,out,dummy);
00058 }
00059 };
00060 }
00061 }
00062 #endif
00063
00064
00065
00066