addEffect_.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
addEffect_.h
Go to the documentation of this file.
1 #ifndef OSL_MOVE_GENERATOR_ADD_EFFECT_H
2 #define OSL_MOVE_GENERATOR_ADD_EFFECT_H
3 #include "osl/move_generator/drop.h"
4 #include "osl/move_generator/addEffectTable.h"
5 #include "osl/move_action/store.h"
6 #include "osl/container/moveVector.h"
7 #include <boost/static_assert.hpp>
8
9 namespace osl
10 {
11 namespace move_generator
12 {
16 template<Player P,Ptype T,bool isAttackToKing=false>
17 struct AddEffectShort
18 {
19 BOOST_STATIC_ASSERT((PtypeTraits<T>::isBasic));
20 BOOST_STATIC_ASSERT((PtypeTraits<T>::canPromote));
30 template<class Action>
31 static void generate(const NumEffectState& state,Square target,Action& action,NearMask nearMask);
32 };
33
37 template<Player P,Ptype T,bool isAttackToKing=false>
38 struct AddEffectLong
39 {
40 BOOST_STATIC_ASSERT((PtypeTraits<T>::isBasic));
44 template<class Action>
45 static void generate(const NumEffectState& state,Square target,Action& action,NearMask nearMask);
46 };
47
48
66 template<Player P,bool isAttackToKing=false>
67 class AddEffect
68 {
69 // BOOST_CLASS_REQUIRE(Action,osl::move_action,Concept);
70 public:
74 template<class Action>
75 static void generateKing(const NumEffectState& state,Square target,Action& action,NearMask nearMask);
76 template<class Action>
77 static void generateGold(const NumEffectState& state,Square target,Action& action,NearMask nearMask);
85 template<class Action>
86 static void generate(const NumEffectState& state,Square target,Action& action);
87 static void generate(const NumEffectState& state,Square target,MoveVector& out)
88 {
89 move_action::Store store(out);
90 generate(state, target, store);
91 }
92 };
93
94 template<bool isAttackToKing=false>
95 struct GenerateAddEffect
96 {
102 static void generate(Player player, const NumEffectState& state, Square target,
103 move_action::Store& store);
104 static void generate(Player player, const NumEffectState& state, Square target,
105 MoveVector& out)
106 {
107 move_action::Store store(out);
108 generate(player, state, target, store);
109 }
110 };
111 } // namespace move_generator
112 } // namespace osl
113 #endif /* OSL_MOVE_GENERATOR_ADD_EFFECT_H */
114 // ;;; Local Variables:
115 // ;;; mode:c++
116 // ;;; c-basic-offset:2
117 // ;;; End: