osl::rating::RelativeKingY Class Reference

`#include <square.h>`

Inheritance diagram for osl::rating::RelativeKingY:

## Public Member Functions

| RelativeKingY (int iy, int ioy, bool a, Ptype p)
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 (int y, int old_y, bool, Ptype ptype)
static int | makeY (bool attack, const NumEffectState &state, Move move)
static int | makeOldY (bool attack, const NumEffectState &state, Move move)
static int | index (bool attack, const NumEffectState &state, Move move)

## Private Attributes

int | y
int | old_y
Ptype | ptype
bool | attack

## Detailed Description

Definition at line 80 of file square.h.

## Constructor & Destructor Documentation

## RelativeKingY()

osl::rating::RelativeKingY::RelativeKingY | ( | int | iy,
|  | int | ioy,
|  | bool | a,
|  | Ptype | p )

inline

Definition at line 87 of file square.h.

References attack, osl::rating::Feature::Feature(), name(), old_y, ptype, and y.

## Member Function Documentation

## index()

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

inline static

Definition at line 115 of file square.h.

References attack, makeOldY(), makeY(), old_y, osl::Move::ptype(), ptype, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, and y.

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

## makeOldY()

int osl::rating::RelativeKingY::makeOldY | ( | bool | attack,
|  | const NumEffectState & | state,
|  | Move | move )

inline static

Definition at line 99 of file square.h.

References osl::alt(), attack, osl::Move::from(), osl::Move::isDrop(), osl::SimpleState::kingSquare(), osl::Move::player(), osl::WHITE, and osl::Square::y().

Referenced by index(), and match().

## makeY()

int osl::rating::RelativeKingY::makeY | ( | bool | attack,
|  | const NumEffectState & | state,
|  | Move | move )

inline static

Definition at line 90 of file square.h.

References osl::alt(), attack, osl::SimpleState::kingSquare(), osl::Move::player(), osl::Move::to(), osl::WHITE, and osl::Square::y().

Referenced by index(), and match().

## match()

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

inline virtual

Implements osl::rating::Feature.

Definition at line 109 of file square.h.

References attack, makeOldY(), makeY(), old_y, osl::Move::ptype(), ptype, and y.

## name()

const std::string osl::rating::RelativeKingY::name | ( | int | y,
|  | int | old_y,
|  | bool | ,
|  | Ptype | ptype )

static

Definition at line 20 of file square.cc.

References old_y, ptype, osl::Ptype_Table, and y.

Referenced by RelativeKingY().

## Member Data Documentation

## attack

bool osl::rating::RelativeKingY::attack

private

Definition at line 84 of file square.h.

Referenced by index(), makeOldY(), makeY(), match(), and RelativeKingY().

## old_y

int osl::rating::RelativeKingY::old_y

private

Definition at line 82 of file square.h.

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

## ptype

Ptype osl::rating::RelativeKingY::ptype

private

Definition at line 83 of file square.h.

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

## y

int osl::rating::RelativeKingY::y

private

Definition at line 82 of file square.h.

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

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

- square.h
- square.cc