osl::rating::Karanari Class Reference

`#include <karanari.h>`

Inheritance diagram for osl::rating::Karanari:

## Public Member Functions

| Karanari (bool b, bool c)
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 bool | matchGeneral (const NumEffectState &state, Move move)
static int | index (const NumEffectState &state, Move move)

## Private Attributes

bool | bishop
bool | can_promote_area

## Detailed Description

Definition at line 12 of file karanari.h.

## Constructor & Destructor Documentation

## Karanari()

osl::rating::Karanari::Karanari | ( | bool | b,
|  | bool | c )

inline

Definition at line 16 of file karanari.h.

References bishop, can_promote_area, and osl::rating::Feature::Feature().

## Member Function Documentation

## index()

int osl::rating::Karanari::index | ( | const NumEffectState & | state,
|  | Move | move )

inline static

Definition at line 40 of file karanari.h.

References osl::Square::canPromote(), osl::Square::isNeighboring8(), osl::SimpleState::kingSquare(), matchGeneral(), osl::PBISHOP, osl::Move::player(), osl::PROOK, osl::Move::ptype(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by osl::rating::KaranariGroup::findMatch().

## match()

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

inline virtual

Implements osl::rating::Feature.

Definition at line 28 of file karanari.h.

References bishop, can_promote_area, osl::Square::canPromote(), osl::Square::isNeighboring8(), osl::SimpleState::kingSquare(), matchGeneral(), osl::PBISHOP, osl::Move::player(), osl::PROOK, osl::Move::ptype(), osl::Move::to(), and osl::SimpleState::turn().

## matchGeneral()

bool osl::rating::Karanari::matchGeneral | ( | const NumEffectState & | state,
|  | Move | move )

inline static

Definition at line 17 of file karanari.h.

References osl::alt(), osl::Square::canPromote(), osl::Move::capturePtype(), osl::Move::from(), osl::Neighboring8Direct::hasEffect(), osl::Move::isPromotion(), osl::SimpleState::kingSquare(), osl::Move::oldPtypeO(), osl::PTYPE_EMPTY, osl::Move::ptypeO(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by index(), and match().

## Member Data Documentation

## bishop

bool osl::rating::Karanari::bishop

private

Definition at line 14 of file karanari.h.

Referenced by Karanari(), and match().

## can_promote_area

bool osl::rating::Karanari::can_promote_area

private

Definition at line 14 of file karanari.h.

Referenced by Karanari(), and match().

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

- karanari.h