shadowEffect.cc
Go to the documentation of this file.
#include "osl/effect_util/shadowEffect.h"
#include "osl/bits/additionalOrShadow.h"
#include "osl/additionalEffect.h"
template <int count_max>
int osl::effect_util::
ShadowEffect::count(const NumEffectState& state, Square target,
Player attack)
{
PieceVector direct_pieces;
state.findEffect(alt(attack), target, direct_pieces);
return AdditionalOrShadow::count<count_max>
(direct_pieces, state, target, attack);
}
bool osl::effect_util::
ShadowEffect::hasEffect(const NumEffectState& state, Square target,
Player attack)
{
return count<1>(state, target, attack);
}
int osl::effect_util::
ShadowEffect::count2(const NumEffectState& state, Square target,
Player attack)
{
return count<2>(state, target, attack);
}
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
additionalEffect.h
additionalOrShadow.h
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::NumEffectState::findEffect
void findEffect(Player P, Square target, PieceVector &out) const
target に利きのあるPieceをoutに格納する
Definition numEffectState.cc:1119
osl::PieceVector
Definition container.h:305
osl::Square
Definition basic_type.h:532
osl::Player
Player
Definition basic_type.h:8
osl::alt
constexpr Player alt(Player player)
Definition basic_type.h:13
shadowEffect.h
osl::effect_util::AdditionalOrShadow::count
static int count(const PieceVector &direct_pieces, const NumEffectState &state, Square target, Player attack)
Definition additionalOrShadow.h:16
osl::effect_util::ShadowEffect::count
static int count(const NumEffectState &, Square target, Player attack)
Definition shadowEffect.cc:7
osl::effect_util::ShadowEffect::count2
static int count2(const NumEffectState &, Square target, Player attack)
target に attack の影利きを二つまで数える.
Definition shadowEffect.cc:24
osl::effect_util::ShadowEffect::hasEffect
static bool hasEffect(const NumEffectState &, Square target, Player attack)
target に attack の影利きが一つでもあるか． 相手の追加利きが先にある場合は対象としない．
Definition shadowEffect.cc:17