00001 #ifndef _MOVE_GENERATOR_ADD_EFFECT_H
00002 #define _MOVE_GENERATOR_ADD_EFFECT_H
00003 #include "osl/move_generator/drop.h"
00004 #include "osl/move_generator/addEffectTable.h"
00005 #include <boost/static_assert.hpp>
00006
00007 namespace osl
00008 {
00009 namespace move_action
00010 {
00011 class Store;
00012 }
00013 namespace move_generator
00014 {
00018 template<Player P,Ptype T,bool isAttackToKing=false>
00019 struct AddEffectShort
00020 {
00021 BOOST_STATIC_ASSERT((PtypeTraits<T>::isBasic));
00022 BOOST_STATIC_ASSERT((PtypeTraits<T>::canPromote));
00032 template<class State,class Action>
00033 static void generate(const State& state,Position target,Action& action,NearMask nearMask);
00034 };
00035
00039 template<Player P,Ptype T,bool isAttackToKing=false>
00040 struct AddEffectLong
00041 {
00042 BOOST_STATIC_ASSERT((PtypeTraits<T>::isBasic));
00046 template<class State,class Action>
00047 static void generate(const State& state,Position target,Action& action,NearMask nearMask);
00048 };
00049
00050
00068 template<Player P,bool isAttackToKing=false>
00069 class AddEffect
00070 {
00071
00072
00073 public:
00077 template<class State,class Action>
00078 static void generateKing(const State& state,Position target,Action& action,NearMask nearMask);
00079 template<class State,class Action>
00080 static void generateGold(const State& state,Position target,Action& action,NearMask nearMask);
00088 template<class State,class Action>
00089 static void generate(const State& state,Position target,Action& action);
00090 };
00091
00092 template<bool isAttackToKing=false>
00093 struct GenerateAddEffect
00094 {
00100 template<class State>
00101 static void generate(Player player, const State& state, Position target,
00102 move_action::Store& store);
00103 };
00104 }
00105 }
00106 #endif
00107
00108
00109
00110