My Project
shadowEffect.cc
Go to the documentation of this file.
4
5template <int count_max>
7ShadowEffect::count(const NumEffectState& state, Square target,
8 Player attack)
9{
10 PieceVector direct_pieces;
11 state.findEffect(alt(attack), target, direct_pieces);
12 return AdditionalOrShadow::count<count_max>
13 (direct_pieces, state, target, attack);
14}
15
18 Player attack)
19{
20 return count<1>(state, target, attack);
21}
22
24ShadowEffect::count2(const NumEffectState& state, Square target,
25 Player attack)
26{
27 return count<2>(state, target, attack);
28}
29
30
31// ;;; Local Variables:
32// ;;; mode:c++
33// ;;; c-basic-offset:2
34// ;;; End:
利きを持つ局面
void findEffect(Player P, Square target, PieceVector &out) const
target に利きのあるPieceをoutに格納する
Player
Definition basic_type.h:8
constexpr Player alt(Player player)
Definition basic_type.h:13
static int count(const NumEffectState &, Square target, Player attack)
static int count2(const NumEffectState &, Square target, Player attack)
target に attack の影利きを二つまで数える.
static bool hasEffect(const NumEffectState &, Square target, Player attack)
target に attack の影利きが一つでもあるか. 相手の追加利きが先にある場合は対象としない.