osl::rating::PinAttack Class Reference

`#include <pinAttack.h>`

Inheritance diagram for osl::rating::PinAttack:

## Public Member Functions

| PinAttack (bool a, Ptype s, Ptype t)
bool | match (const NumEffectState &state, Move move, const RatingEnv &, Piece p) const
bool | match (const NumEffectState &state, Move move, const RatingEnv &env) const
Public Member Functions inherited from osl::rating::Feature
| Feature (const std::string &name)
virtual | ~Feature ()
virtual bool | effectiveInCheck () const
const std::string & | name () const

## Static Public Member Functions

static int | index (const NumEffectState &state, Move move, const RatingEnv &, bool attack, Piece p)
static int | index (const NumEffectState &state, Move move, const RatingEnv &env, bool attack)
static const std::string | name (bool attack, Ptype self, Ptype target)

## Private Attributes

bool | attack
Ptype | self
Ptype | target

## Detailed Description

Definition at line 13 of file pinAttack.h.

## Constructor & Destructor Documentation

## PinAttack()

osl::rating::PinAttack::PinAttack | ( | bool | a,
|  | Ptype | s,
|  | Ptype | t )

inline

Definition at line 18 of file pinAttack.h.

References attack, osl::rating::Feature::Feature(), name(), self, and target.

## Member Function Documentation

## index() [1/2]

int osl::rating::PinAttack::index | ( | const NumEffectState & | state,
|  | Move | move,
|  | const RatingEnv & | ,
|  | bool | attack,
|  | Piece | p )

inline static

Definition at line 45 of file pinAttack.h.

References attack, osl::Move::from(), osl::NumEffectState::hasEffectByPiece(), osl::NumEffectState::hasEffectIf(), index(), osl::Move::isDrop(), osl::SimpleState::pieceOnBoard(), osl::Move::ptype(), osl::Piece::ptype(), osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, osl::Move::ptypeO(), osl::Piece::square(), and osl::Move::to().

Referenced by osl::rating::PinGroup::findMatch(), index(), and index().

## index() [2/2]

int osl::rating::PinAttack::index | ( | const NumEffectState & | state,
|  | Move | move,
|  | const RatingEnv & | env,
|  | bool | attack )

inline static

Definition at line 55 of file pinAttack.h.

References osl::alt(), osl::PieceMask::any(), attack, osl::NumEffectState::countEffect(), index(), osl::rating::RatingEnv::my_pin, osl::rating::RatingEnv::op_pin, osl::SimpleState::pieceOf(), osl::container::PieceMask64::takeOneBit(), osl::Move::to(), and osl::SimpleState::turn().

## match() [1/2]

bool osl::rating::PinAttack::match | ( | const NumEffectState & | state,
|  | Move | move,
|  | const RatingEnv & | ,
|  | Piece | p ) const

inline

Definition at line 23 of file pinAttack.h.

References osl::Move::from(), osl::NumEffectState::hasEffectByPiece(), osl::NumEffectState::hasEffectIf(), osl::Move::isDrop(), osl::SimpleState::pieceOnBoard(), osl::Piece::ptype(), osl::Move::ptypeO(), osl::Piece::square(), target, and osl::Move::to().

Referenced by match().

## match() [2/2]

bool osl::rating::PinAttack::match | ( | const NumEffectState & | state,
|  | Move | move,
|  | const RatingEnv & | env ) const

inline virtual

Implements osl::rating::Feature.

Definition at line 31 of file pinAttack.h.

References osl::alt(), osl::PieceMask::any(), attack, osl::NumEffectState::countEffect(), match(), osl::rating::RatingEnv::my_pin, osl::rating::RatingEnv::op_pin, osl::SimpleState::pieceOf(), osl::Move::ptype(), self, osl::container::PieceMask64::takeOneBit(), osl::Move::to(), and osl::SimpleState::turn().

## name()

const std::string osl::rating::PinAttack::name | ( | bool | attack,
|  | Ptype | self,
|  | Ptype | target )

inline static

Definition at line 68 of file pinAttack.h.

References attack, osl::Ptype_Table, self, and target.

Referenced by PinAttack().

## Member Data Documentation

## attack

bool osl::rating::PinAttack::attack

private

Definition at line 15 of file pinAttack.h.

Referenced by index(), index(), match(), name(), and PinAttack().

## self

Ptype osl::rating::PinAttack::self

private

Definition at line 16 of file pinAttack.h.

Referenced by match(), name(), and PinAttack().

## target

Ptype osl::rating::PinAttack::target

private

Definition at line 16 of file pinAttack.h.

Referenced by match(), name(), and PinAttack().

The documentation for this class was generated from the following file:

- pinAttack.h