osl::rating::RelativeKingX Class Reference

`#include <square.h>`

Inheritance diagram for osl::rating::RelativeKingX:

## Public Member Functions

| RelativeKingX (int ix, int iox, 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 x, int old_x, bool, Ptype)
static int | makeX (bool attack, const NumEffectState &state, Move move)
static int | makeOldX (bool attack, const NumEffectState &state, Move move)
static int | index (bool attack, const NumEffectState &state, Move move)

## Private Attributes

int | x
int | old_x
Ptype | ptype
bool | attack

## Detailed Description

Definition at line 43 of file square.h.

## Constructor & Destructor Documentation

## RelativeKingX()

osl::rating::RelativeKingX::RelativeKingX | ( | int | ix,
|  | int | iox,
|  | bool | a,
|  | Ptype | p )

inline

Definition at line 50 of file square.h.

References attack, osl::rating::Feature::Feature(), name(), old_x, ptype, and x.

## Member Function Documentation

## index()

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

inline static

Definition at line 72 of file square.h.

References attack, makeOldX(), makeX(), old_x, osl::Move::ptype(), ptype, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, and x.

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

## makeOldX()

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

inline static

Definition at line 59 of file square.h.

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

Referenced by index(), and match().

## makeX()

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

inline static

Definition at line 53 of file square.h.

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

Referenced by index(), and match().

## match()

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

inline virtual

Implements osl::rating::Feature.

Definition at line 66 of file square.h.

References attack, makeOldX(), makeX(), old_x, osl::Move::ptype(), ptype, and x.

## name()

const std::string osl::rating::RelativeKingX::name | ( | int | x,
|  | int | old_x,
|  | bool | ,
|  | Ptype | ptype )

static

Definition at line 7 of file square.cc.

References old_x, ptype, osl::Ptype_Table, and x.

Referenced by RelativeKingX().

## Member Data Documentation

## attack

bool osl::rating::RelativeKingX::attack

private

Definition at line 47 of file square.h.

Referenced by index(), makeOldX(), makeX(), match(), and RelativeKingX().

## old_x

int osl::rating::RelativeKingX::old_x

private

Definition at line 45 of file square.h.

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

## ptype

Ptype osl::rating::RelativeKingX::ptype

private

Definition at line 46 of file square.h.

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

## x

int osl::rating::RelativeKingX::x

private

Definition at line 45 of file square.h.

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

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

- square.h
- square.cc