additionalEffect.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
additionalEffect.h
Go to the documentation of this file.
1 #ifndef OSL_ADDITIONAL_EFFECT_H
2 #define OSL_ADDITIONAL_EFFECT_H
3 #include "osl/state/numEffectState.h"
4 namespace osl
5 {
6 namespace container
7 {
8 class PieceVector;
9 }
10 namespace effect_util
11 {
12 using container::PieceVector;
16 struct AdditionalEffect
17 {
18 private:
19 static void find(const NumEffectState&, Square target,
20 const PieceVector& direct_effects,
21 PieceVector& black, PieceVector& white);
22 template <int count_max>
23 static int count(const NumEffectState&, Square target,
24 Player attack);
25 public:
30 static bool hasEffect(const NumEffectState&, Square target,
31 Player attack);
32 static bool hasEffectStable(const NumEffectState&, Square target,
33 Player attack);
38 static int count2(const NumEffectState&, Square target,
39 Player attack);
44 static void find(const NumEffectState&, Square target,
45 PieceVector& black, PieceVector& white);
46 static void count(const NumEffectState&, Square target,
47 int& black, int& white);
48 static int count(const NumEffectState& state, Player pl, Square target)
49 {
50 int black, white;
51 count(state, target, black, white);
52 return (pl == BLACK) ? black : white;
53 }
54 };
55 } // namespace effect_util
56 using effect_util::AdditionalEffect;
57 } // namespace osl
58
59 #endif /* OSL_ADDITIONAL_EFFECT_H */
60 // ;;; Local Variables:
61 // ;;; mode:c++
62 // ;;; c-basic-offset:2
63 // ;;; End: