shadowEffect.cc
Go to the documentation of this file.
00001 #include "osl/effect_util/shadowEffect.h"
00002 #include "osl/effect_util/additionalOrShadow.h"
00003 #include "osl/effect_util/effectUtil.h"
00004 
00005 template <int count_max>
00006 int osl::effect_util::
00007 ShadowEffect::count(const NumEffectState& state, Square target, 
00008                     Player attack)
00009 {
00010   PieceVector direct_pieces;
00011   EffectUtil::findEffect(alt(attack), state, target, direct_pieces);
00012   return AdditionalOrShadow::count<count_max>
00013     (direct_pieces, state, target, attack);
00014 }
00015 
00016 bool osl::effect_util::
00017 ShadowEffect::hasEffect(const NumEffectState& state, Square target, 
00018                         Player attack)
00019 {
00020   return count<1>(state, target, attack);
00021 }
00022 
00023 int osl::effect_util::
00024 ShadowEffect::count2(const NumEffectState& state, Square target, 
00025                      Player attack)
00026 {
00027   return count<2>(state, target, attack);
00028 }
00029 
00030 
00031 // ;;; Local Variables:
00032 // ;;; mode:c++
00033 // ;;; c-basic-offset:2
00034 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines