My Project
std
osl
effect_util
shadowEffect.cc
Go to the documentation of this file.
1
#include "
osl/effect_util/shadowEffect.h
"
2
#include "
osl/bits/additionalOrShadow.h
"
3
#include "
osl/additionalEffect.h
"
4
5
template
<
int
count_max>
6
int
osl::effect_util::
7
ShadowEffect::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
16
bool
osl::effect_util::
17
ShadowEffect::hasEffect
(
const
NumEffectState
& state,
Square
target,
18
Player
attack)
19
{
20
return
count<1>(state, target, attack);
21
}
22
23
int
osl::effect_util::
24
ShadowEffect::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:
osl::Square
Definition:
basic_type.h:532
osl::effect_util::ShadowEffect::count2
static int count2(const NumEffectState &, Square target, Player attack)
target に attack の影利きを二つまで数える.
Definition:
shadowEffect.cc:24
osl::alt
constexpr Player alt(Player player)
Definition:
basic_type.h:13
osl::effect_util::ShadowEffect::hasEffect
static bool hasEffect(const NumEffectState &, Square target, Player attack)
target に attack の影利きが一つでもあるか. 相手の追加利きが先にある場合は対象としない.
Definition:
shadowEffect.cc:17
additionalOrShadow.h
osl::PieceVector
Definition:
container.h:305
osl::NumEffectState
利きを持つ局面
Definition:
numEffectState.h:34
additionalEffect.h
osl::Player
Player
Definition:
basic_type.h:8
osl::effect_util::ShadowEffect::count
static int count(const NumEffectState &, Square target, Player attack)
Definition:
shadowEffect.cc:7
osl::NumEffectState::findEffect
void findEffect(Player P, Square target, PieceVector &out) const
target に利きのあるPieceをoutに格納する
Definition:
numEffectState.cc:1119
shadowEffect.h
Generated by
1.8.18