osl::rating::Block Class Reference

`#include <feature.h>`

Inheritance diagram for osl::rating::Block:

## Public Member Functions

| Block (int s, int o)
bool | match (const NumEffectState &state, Move move, const RatingEnv &) const
bool | effectiveInCheck () const
Public Member Functions inherited from osl::rating::Feature
| Feature (const std::string &name)
virtual | ~Feature ()
const std::string & | name () const

## Static Public Member Functions

static const std::string | name (int self, int opponent)
static int | count (const NumEffectState &state, Square position, Player player)

## Private Attributes

int | self
int | opponent

## Detailed Description

Definition at line 85 of file rating/feature.h.

## Constructor & Destructor Documentation

## Block()

osl::rating::Block::Block | ( | int | s,
|  | int | o )

inline

Definition at line 90 of file rating/feature.h.

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

## Member Function Documentation

## count()

int osl::rating::Block::count | ( | const NumEffectState & | state,
|  | Square | position,
|  | Player | player )

inline static

Definition at line 91 of file rating/feature.h.

References osl::BISHOP, osl::NumEffectState::findAttackAt(), osl::NumEffectState::hasEffectByPtype(), osl::LANCE, and osl::ROOK.

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

## effectiveInCheck()

bool osl::rating::Block::effectiveInCheck | ( |  | ) | const

inline virtual

Reimplemented from osl::rating::Feature.

Definition at line 102 of file rating/feature.h.

## match()

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

inline virtual

Implements osl::rating::Feature.

Definition at line 97 of file rating/feature.h.

References osl::alt(), count(), opponent, self, osl::Move::to(), and osl::SimpleState::turn().

## name()

const std::string osl::rating::Block::name | ( | int | self,
|  | int | opponent )

static

Definition at line 28 of file feature.cc.

References opponent, and self.

Referenced by Block().

## Member Data Documentation

## opponent

int osl::rating::Block::opponent

private

Definition at line 87 of file rating/feature.h.

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

## self

int osl::rating::Block::self

private

Definition at line 87 of file rating/feature.h.

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

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

- rating/feature.h
- feature.cc