osl::rating::Threatmate Class Reference

`#include <checkmate.h>`

Inheritance diagram for osl::rating::Threatmate:

## Classes

struct | Helper

## Public Member Functions

| Threatmate ()
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 | isCandidate (const NumEffectState &state, Move move)
static bool | knight2Step (const NumEffectState &state, Move move, Square king)
static bool | captureForKnightCheck (const NumEffectState &state, Move move, Square king)

## Detailed Description

Definition at line 27 of file checkmate.h.

## Constructor & Destructor Documentation

## Threatmate()

osl::rating::Threatmate::Threatmate | ( |  | ) |

inline

Definition at line 30 of file checkmate.h.

References osl::rating::Feature::Feature().

## Member Function Documentation

## captureForKnightCheck()

bool osl::rating::Threatmate::captureForKnightCheck | ( | const NumEffectState & | state,
|  | Move | move,
|  | Square | king )

static

Definition at line 35 of file checkmate.cc.

References osl::alt(), osl::Board_Table, osl::Piece::canMoveOn(), osl::captured(), osl::Move::capturePtype(), osl::NumEffectState::hasEffectByPtypeStrict(), osl::NumEffectState::hasEffectNotBy(), osl::SimpleState::hasPieceOnStand(), osl::Piece::isEmpty(), osl::KNIGHT, osl::SimpleState::pieceAt(), osl::SimpleState::pieceOnBoard(), osl::Move::to(), osl::SimpleState::turn(), osl::unpromote(), osl::UUL, and osl::UUR.

Referenced by isCandidate().

## isCandidate()

bool osl::rating::Threatmate::isCandidate | ( | const NumEffectState & | state,
|  | Move | move )

static

Definition at line 61 of file checkmate.cc.

References osl::alt(), osl::misc::GeneralMask< Integer >::any(), captureForKnightCheck(), osl::Move::capturePtype(), osl::Move::capturePtypeO(), osl::checkmate::King8Info::dropCandidate(), osl::Move::from(), osl::NumEffectState::hasEffectByPtypeStrict(), osl::NumEffectState::hasEffectIf(), osl::Neighboring8Direct::hasEffectOrAdditional(), osl::SimpleState::hasPieceOnStand(), osl::NumEffectState::inCheck(), osl::Move::isDrop(), osl::Square::isNeighboring8(), osl::NumEffectState::king8Info(), osl::SimpleState::kingSquare(), osl::KNIGHT, knight2Step(), osl::checkmate::King8Info::liberty(), osl::NumEffectState::longEffectAt(), osl::checkmate::King8Info::moveCandidate2(), osl::newPtypeO(), osl::PTYPE_EMPTY, osl::Move::ptypeO(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by match().

## knight2Step()

bool osl::rating::Threatmate::knight2Step | ( | const NumEffectState & | state,
|  | Move | move,
|  | Square | king )

static

Definition at line 24 of file checkmate.cc.

References osl::KNIGHT, osl::Move::ptype(), osl::sign(), osl::Move::to(), osl::SimpleState::turn(), osl::Square::x(), and osl::Square::y().

Referenced by isCandidate().

## match()

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

virtual

Implements osl::rating::Feature.

Definition at line 94 of file checkmate.cc.

References isCandidate(), and osl::NumEffectState::makeUnmakeMove().

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

- checkmate.h
- checkmate.cc