All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
addEffectWithEffect.h
Go to the documentation of this file.
1 #ifndef OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H
2 #define OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H
7 #include <boost/static_assert.hpp>
8 
9 namespace osl
10 {
11  namespace move_generator
12  {
28  template<class Action>
30  {
31  public:
32  template<Player P,bool isAttackToKing>
33  static void generate(const NumEffectState& state,Square target,Action& action,bool& hasPawnCheckmate);
34  template<Player P,bool isAttackToKing>
35  static void generate(const NumEffectState& state,Square target,Action& action){
36  bool dummy;
37  generate<P,isAttackToKing>(state,target,action,dummy);
38  }
39  };
41  {
46  template<bool isAttackToKing>
47  static void generate(Player player, const NumEffectState& state, Square target,
49  template<bool isAttackToKing>
50  static void generate(Player player,const NumEffectState& state,Square target,MoveVector& out, bool& has_pawn_checkmate) {
52  if(player==BLACK)
53  AddEffectWithEffect<move_action::Store>::template generate<BLACK,isAttackToKing>(state,target,store,has_pawn_checkmate);
54  else
55  AddEffectWithEffect<move_action::Store>::template generate<WHITE,isAttackToKing>(state,target,store,has_pawn_checkmate);
56  }
57  template<bool isAttackToKing>
58  static void generate(Player player,const NumEffectState& state,Square target,MoveVector& out) {
59  bool dummy;
60  generate<isAttackToKing>(player,state,target,out,dummy);
61  }
62  };
63  } // namespace move_generator
64 } // namespace osl
65 #endif /* OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H */
66 // ;;; Local Variables:
67 // ;;; mode:c++
68 // ;;; c-basic-offset:2
69 // ;;; End: