additionalEffect.h
Go to the documentation of this file.
#ifndef OSL_ADDITIONAL_EFFECT_H
#define OSL_ADDITIONAL_EFFECT_H
#include "osl/numEffectState.h"
namespace osl
{
namespace effect_util
{
struct AdditionalEffect
{
private:
static void find(const NumEffectState&, Square target,
const PieceVector& direct_effects,
PieceVector& black, PieceVector& white);
template <int count_max>
static int count(const NumEffectState&, Square target,
Player attack);
public:
static bool hasEffect(const NumEffectState&, Square target,
Player attack);
static bool hasEffectStable(const NumEffectState&, Square target,
Player attack);
static int count2(const NumEffectState&, Square target,
Player attack);
static void find(const NumEffectState&, Square target,
PieceVector& black, PieceVector& white);
static void count(const NumEffectState&, Square target,
int& black, int& white);
static int count(const NumEffectState& state, Player pl, Square target)
{
int black, white;
count(state, target, black, white);
return (pl == BLACK) ? black : white;
}
};
} // namespace effect_util
using effect_util::AdditionalEffect;
} // namespace osl
#endif /* OSL_ADDITIONAL_EFFECT_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::PieceVector
Definition container.h:305
osl::Square
Definition basic_type.h:532
osl::effect_util
Definition additionalEffect.h:8
osl
Definition additionalEffect.h:6
osl::Player
Player
Definition basic_type.h:8
osl::BLACK
@ BLACK
Definition basic_type.h:9
numEffectState.h
osl::effect_util::AdditionalEffect
追加利きを求める
Definition additionalEffect.h:13
osl::effect_util::AdditionalEffect::hasEffectStable
static bool hasEffectStable(const NumEffectState &, Square target, Player attack)
Definition additionalEffect.cc:36
osl::effect_util::AdditionalEffect::count
static int count(const NumEffectState &state, Player pl, Square target)
Definition additionalEffect.h:44
osl::effect_util::AdditionalEffect::count
static int count(const NumEffectState &, Square target, Player attack)
Definition additionalEffect.cc:26
osl::effect_util::AdditionalEffect::find
static void find(const NumEffectState &, Square target, const PieceVector &direct_effects, PieceVector &black, PieceVector &white)
Definition additionalEffect.cc:50
osl::effect_util::AdditionalEffect::hasEffect
static bool hasEffect(const NumEffectState &, Square target, Player attack)
target に attack の追加利きが一つでもあるか． 相手の影利きが先にある場合は対象としない．
Definition additionalEffect.cc:5
osl::effect_util::AdditionalEffect::count2
static int count2(const NumEffectState &, Square target, Player attack)
target に attack の追加利きを二つまで数える.
Definition additionalEffect.cc:43