osl::effect_util::AdditionalEffect Struct Reference

追加利きを求める More...

`#include <additionalEffect.h>`

## Static Public Member Functions

static bool | hasEffect (const NumEffectState &, Square target, Player attack)
| target に attack の追加利きが一つでもあるか． 相手の影利きが先にある場合は対象としない．
static bool | hasEffectStable (const NumEffectState &, Square target, Player attack)
static int | count2 (const NumEffectState &, Square target, Player attack)
| target に attack の追加利きを二つまで数える.
static void | find (const NumEffectState &, Square target, PieceVector &black, PieceVector &white)
| target に対する追加利きのある Piece を black, white に求める.
static void | count (const NumEffectState &, Square target, int &black, int &white)
static int | count (const NumEffectState &state, Player pl, Square target)

## Static Private Member Functions

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)

## Detailed Description

追加利きを求める

Definition at line 12 of file additionalEffect.h.

## Member Function Documentation

## count() [1/3]

void osl::effect_util::AdditionalEffect::count | ( | const NumEffectState & | state,
|  | Square | target,
|  | int & | black,
|  | int & | white )

static

Definition at line 95 of file additionalEffect.cc.

References find(), and osl::FixedCapacityVector< T, Capacity >::size().

## count() [2/3]

template<int count_max>

int osl::effect_util::AdditionalEffect::count | ( | const NumEffectState & | state,
|  | Square | target,
|  | Player | attack )

static private

Definition at line 25 of file additionalEffect.cc.

References osl::effect_util::AdditionalOrShadow::count(), and osl::NumEffectState::findEffect().

Referenced by count(), count2(), and hasEffectStable().

## count() [3/3]

int osl::effect_util::AdditionalEffect::count | ( | const NumEffectState & | state,
|  | Player | pl,
|  | Square | target )

inline static

Definition at line 44 of file additionalEffect.h.

References osl::BLACK, and count().

## count2()

int osl::effect_util::AdditionalEffect::count2 | ( | const NumEffectState & | state,
|  | Square | target,
|  | Player | attack )

static

target に attack の追加利きを二つまで数える.

相手の影利きの駒以降は対象としない．

Definition at line 42 of file additionalEffect.cc.

References count().

## find() [1/2]

void osl::effect_util::AdditionalEffect::find | ( | const NumEffectState & | state,
|  | Square | target,
|  | const PieceVector & | direct_effects,
|  | PieceVector & | black,
|  | PieceVector & | white )

static private

Definition at line 49 of file additionalEffect.cc.

References osl::BLACK, osl::Board_Table, osl::Piece::isPiece(), osl::SimpleState::nextPiece(), osl::Piece::owner(), osl::Ptype_Table, osl::Piece::ptypeO(), osl::FixedCapacityVector< T, Capacity >::push_back(), osl::Piece::square(), osl::Square::square, and osl::Offset::zero().

Referenced by count(), and find().

## find() [2/2]

void osl::effect_util::AdditionalEffect::find | ( | const NumEffectState & | state,
|  | Square | target,
|  | PieceVector & | black,
|  | PieceVector & | white )

static

target に対する追加利きのある Piece を black, white に求める.

[*] +KI -HI +HI の場合，-HIも+HIもカウント.

Definition at line 82 of file additionalEffect.cc.

References osl::BLACK, osl::FixedCapacityVector< T, Capacity >::clear(), find(), osl::NumEffectState::findEffect(), and osl::WHITE.

## hasEffect()

bool osl::effect_util::AdditionalEffect::hasEffect | ( | const NumEffectState & | state,
|  | Square | target,
|  | Player | attack )

static

target に attack の追加利きが一つでもあるか． 相手の影利きが先にある場合は対象としない．

Definition at line 4 of file additionalEffect.cc.

References osl::PieceMask::any(), osl::BLACK, osl::Board_Table, osl::PieceMask::clearBit(), osl::NumEffectState::effectSetAt(), osl::Piece::isEmptyNum(), osl::KNIGHT, osl::NumEffectState::longEffectNumTable(), osl::Piece::owner(), osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::NumEffectState::promotedPieces(), osl::container::PieceMask64::setAll(), osl::Piece::square(), and osl::container::PieceMask64::takeOneBit().

Referenced by osl::checkmate::ProofNumberTable::countLiberty(), and osl::checkmate::King8Info::moveCandidateDir().

## hasEffectStable()

bool osl::effect_util::AdditionalEffect::hasEffectStable | ( | const NumEffectState & | state,
|  | Square | target,
|  | Player | attack )

static

Definition at line 35 of file additionalEffect.cc.

References count().

The documentation for this struct was generated from the following files:

- additionalEffect.h
- additionalEffect.cc