00001 #ifndef OSL_ADDITIONAL_EFFECT_H
00002 #define OSL_ADDITIONAL_EFFECT_H
00003 #include "osl/state/numEffectState.h"
00004 namespace osl
00005 {
00006 namespace container
00007 {
00008 class PieceVector;
00009 }
00010 namespace effect_util
00011 {
00012 using container::PieceVector;
00016 struct AdditionalEffect
00017 {
00018 private:
00019 static void find(const NumEffectState&, Position target,
00020 const PieceVector& direct_effects,
00021 PieceVector& black, PieceVector& white);
00022 template <int count_max>
00023 static int count(const NumEffectState&, Position target,
00024 Player attack);
00025 public:
00030 static bool hasEffect(const NumEffectState&, Position target,
00031 Player attack);
00036 static int count2(const NumEffectState&, Position target,
00037 Player attack);
00042 static void find(const NumEffectState&, Position target,
00043 PieceVector& black, PieceVector& white);
00044 static void count(const NumEffectState&, Position target,
00045 int& black, int& white);
00046 static int count(const NumEffectState& state, Player pl, Position target)
00047 {
00048 int black, white;
00049 count(state, target, black, white);
00050 return (pl == BLACK) ? black : white;
00051 }
00052 };
00053 }
00054 using effect_util::AdditionalEffect;
00055 }
00056
00057 #endif
00058
00059
00060
00061