osl::rating::PatternBlock Class Reference

`#include <pattern.h>`

Inheritance diagram for osl::rating::PatternBlock:

## Public Member Functions

| PatternBlock (Ptype s, Ptype a, LongTarget t)
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 const PieceSquare | find (const NumEffectState &state, Move move, Ptype attacker_ptype)

## Private Attributes

Ptype | self
Ptype | attack
LongTarget | target

## Detailed Description

Definition at line 173 of file pattern.h.

## Constructor & Destructor Documentation

## PatternBlock()

osl::rating::PatternBlock::PatternBlock | ( | Ptype | s,
|  | Ptype | a,
|  | LongTarget | t )

Definition at line 97 of file pattern.cc.

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

## Member Function Documentation

## find()

const osl::rating::PieceSquare osl::rating::PatternBlock::find | ( | const NumEffectState & | state,
|  | Move | move,
|  | Ptype | attacker_ptype )

static

Definition at line 104 of file pattern.cc.

References osl::alt(), attack, osl::BISHOP, osl::Board_Table, osl::Piece::EDGE(), osl::NumEffectState::findAttackAt(), osl::LANCE, osl::rating::PatternLong::nextPieceOrEnd(), osl::ROOK, osl::Square::STAND(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by osl::rating::PatternBlockGroup::findMatch(), and match().

## match()

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

inline virtual

Implements osl::rating::Feature.

Definition at line 180 of file pattern.h.

References osl::alt(), attack, find(), osl::Move::player(), osl::Move::ptype(), self, and target.

## Member Data Documentation

## attack

Ptype osl::rating::PatternBlock::attack

private

Definition at line 175 of file pattern.h.

Referenced by find(), match(), and PatternBlock().

## self

Ptype osl::rating::PatternBlock::self

private

Definition at line 175 of file pattern.h.

Referenced by match(), and PatternBlock().

## target

LongTarget osl::rating::PatternBlock::target

private

Definition at line 176 of file pattern.h.

Referenced by match(), and PatternBlock().

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

- pattern.h
- pattern.cc