osl::rating::CountEffect2 Struct Reference

`#include <countEffect2.h>`

Inheritance diagram for osl::rating::CountEffect2:

## Public Member Functions

| CountEffect2 (int a, int d)
bool | match (const NumEffectState &state, Square position, const RatingEnv &env) const

## Static Public Member Functions

static std::pair< int, int > | count (const NumEffectState &state, Square position, const RatingEnv &env)
static std::string | name (int attack, int defense)
static int | index (const NumEffectState &state, Square position, const RatingEnv &env)

## Public Attributes

int | attack
int | defense

## Static Public Attributes

static const int | Max = 2

## Detailed Description

Definition at line 14 of file countEffect2.h.

## Constructor & Destructor Documentation

## CountEffect2()

osl::rating::CountEffect2::CountEffect2 | ( | int | a,
|  | int | d )

inline

Definition at line 18 of file countEffect2.h.

References attack, and defense.

Referenced by osl::rating::AttackKing8::AttackKing8(), osl::rating::FromEffect::FromEffect(), osl::rating::LongTarget::LongTarget(), osl::rating::Pattern::Pattern(), and osl::rating::Pattern::Pattern().

## Member Function Documentation

## count()

std::pair< int, int > osl::rating::CountEffect2::count | ( | const NumEffectState & | state,
|  | Square | position,
|  | const RatingEnv & | env )

inline static

Definition at line 21 of file countEffect2.h.

References osl::alt(), attack, osl::NumEffectState::countEffect(), defense, osl::AdditionalEffect::hasEffect(), osl::Square::isOnBoard(), Max, osl::rating::RatingEnv::my_pin, osl::rating::RatingEnv::op_pin, and osl::SimpleState::turn().

Referenced by index(), and match().

## index()

int osl::rating::CountEffect2::index | ( | const NumEffectState & | state,
|  | Square | position,
|  | const RatingEnv & | env )

inline static

Definition at line 43 of file countEffect2.h.

References count(), osl::rating::RatingEnv::counteffect2_cache, osl::Square::index(), osl::Square::isOnBoard(), and Max.

Referenced by osl::rating::AttackKing8Group::findMatch(), osl::rating::FromEffectGroup::findMatch(), osl::rating::PatternBlockGroup::findMatch(), osl::rating::PatternGroup::findMatch(), and osl::rating::PatternLongGroup::findMatch().

## match()

bool osl::rating::CountEffect2::match | ( | const NumEffectState & | state,
|  | Square | position,
|  | const RatingEnv & | env ) const

inline

Definition at line 37 of file countEffect2.h.

References attack, count(), and defense.

Referenced by osl::rating::AttackKing8::match(), osl::rating::FromEffect::match(), osl::rating::LongTarget::match(), osl::rating::Pattern::match(), and osl::rating::LongTarget::matchOtherThanPromotable().

## name()

std::string osl::rating::CountEffect2::name | ( | int | attack,
|  | int | defense )

static

Definition at line 9 of file countEffect2.cc.

References attack, and defense.

Referenced by osl::rating::LongTarget::name().

## Member Data Documentation

## attack

int osl::rating::CountEffect2::attack

Definition at line 17 of file countEffect2.h.

Referenced by osl::rating::AttackKing8::AttackKing8(), count(), CountEffect2(), osl::rating::FromEffect::FromEffect(), osl::rating::LongTarget::LongTarget(), match(), name(), osl::rating::LongTarget::name(), osl::rating::Pattern::Pattern(), and osl::rating::Pattern::Pattern().

## defense

int osl::rating::CountEffect2::defense

Definition at line 17 of file countEffect2.h.

Referenced by osl::rating::AttackKing8::AttackKing8(), count(), CountEffect2(), osl::rating::FromEffect::FromEffect(), osl::rating::LongTarget::LongTarget(), match(), name(), osl::rating::LongTarget::name(), osl::rating::Pattern::Pattern(), and osl::rating::Pattern::Pattern().

## Max

const int osl::rating::CountEffect2::Max = 2

static

Definition at line 16 of file countEffect2.h.

Referenced by count(), and index().

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

- countEffect2.h
- countEffect2.cc