osl::rating::DefenseKing8 Class Reference

`#include <king8.h>`

Inheritance diagram for osl::rating::DefenseKing8:

## Public Member Functions

| DefenseKing8 (Ptype s, bool d, int dan)
bool | match (const NumEffectState &state, Move move, const RatingEnv &) 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 std::string | name (Ptype self, bool drop, int danger)
static int | count (const NumEffectState &state)
static bool | blocking (const NumEffectState &state, Square king, Square to)
static bool | matchDrop (const NumEffectState &state, Move move)
static bool | matchMove (const NumEffectState &state, Move move)

## Private Attributes

Ptype | self
bool | drop
int | danger

## Detailed Description

Definition at line 46 of file std/osl/rating/feature/king8.h.

## Constructor & Destructor Documentation

## DefenseKing8()

osl::rating::DefenseKing8::DefenseKing8 | ( | Ptype | s,
|  | bool | d,
|  | int | dan )

inline

Definition at line 53 of file std/osl/rating/feature/king8.h.

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

## Member Function Documentation

## blocking()

bool osl::rating::DefenseKing8::blocking | ( | const NumEffectState & | state,
|  | Square | king,
|  | Square | to )

inline static

Definition at line 76 of file std/osl/rating/feature/king8.h.

References osl::alt(), osl::BISHOP, osl::NumEffectState::findAttackAt(), osl::Neighboring8Direct::hasEffect(), osl::Piece::isPiece(), osl::LANCE, osl::newPtypeO(), osl::Piece::ptype(), osl::ROOK, osl::Piece::square(), and osl::SimpleState::turn().

Referenced by matchDrop(), and matchMove().

## count()

int osl::rating::DefenseKing8::count | ( | const NumEffectState & | state | ) |

inline static

Definition at line 57 of file std/osl/rating/feature/king8.h.

References osl::alt(), count(), osl::NumEffectState::hasEffectAt(), osl::Piece::isEdge(), osl::SimpleState::kingSquare(), osl::SimpleState::pieceAt(), osl::SimpleState::turn(), and osl::Square::x().

Referenced by count(), osl::rating::DefenseKing8Group::findMatch(), osl::rating::RatingEnv::make(), and match().

## match()

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

inline virtual

Implements osl::rating::Feature.

Definition at line 114 of file std/osl/rating/feature/king8.h.

References count(), danger, drop, matchDrop(), matchMove(), osl::Move::ptype(), and self.

## matchDrop()

bool osl::rating::DefenseKing8::matchDrop | ( | const NumEffectState & | state,
|  | Move | move )

inline static

Definition at line 91 of file std/osl/rating/feature/king8.h.

References blocking(), osl::Neighboring8Direct::hasEffect(), osl::Move::isDrop(), osl::Square::isNeighboring8(), osl::SimpleState::kingSquare(), osl::Move::ptypeO(), osl::Move::to(), and osl::SimpleState::turn().

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

## matchMove()

bool osl::rating::DefenseKing8::matchMove | ( | const NumEffectState & | state,
|  | Move | move )

inline static

Definition at line 101 of file std/osl/rating/feature/king8.h.

References blocking(), osl::Move::from(), osl::Neighboring8Direct::hasEffect(), osl::Move::isDrop(), osl::Square::isNeighboring8(), osl::KING, osl::SimpleState::kingSquare(), osl::Move::ptype(), osl::Move::ptypeO(), osl::Move::to(), and osl::SimpleState::turn().

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

## name()

const std::string osl::rating::DefenseKing8::name | ( | Ptype | self,
|  | bool | drop,
|  | int | danger )

static

Definition at line 11 of file king8_.cc.

References danger, drop, osl::Ptype_Table, and self.

Referenced by DefenseKing8().

## Member Data Documentation

## danger

int osl::rating::DefenseKing8::danger

private

Definition at line 50 of file std/osl/rating/feature/king8.h.

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

## drop

bool osl::rating::DefenseKing8::drop

private

Definition at line 49 of file std/osl/rating/feature/king8.h.

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

## self

Ptype osl::rating::DefenseKing8::self

private

Definition at line 48 of file std/osl/rating/feature/king8.h.

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

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

- std/osl/rating/feature/king8.h
- king8_.cc