#include <checkmate.h>
Classes | |
struct | Helper |
Public Member Functions | |
Threatmate () | |
bool | match (const NumEffectState &state, Move move, const RatingEnv &) 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) |
Definition at line 27 of file checkmate.h.
osl::rating::Threatmate::Threatmate | ( | ) | [inline] |
Definition at line 30 of file checkmate.h.
bool osl::rating::Threatmate::captureForKnightCheck | ( | const NumEffectState & | state, |
Move | move, | ||
Square | king | ||
) | [static] |
Definition at line 36 of file checkmate.cc.
References osl::alt(), osl::Board_Table, osl::Piece::canMoveOn(), osl::captured(), osl::Move::capturePtype(), osl::Piece::isEmpty(), osl::Piece::isPiece(), osl::KNIGHT, osl::BoardTable::nextSquare(), osl::Move::to(), osl::unpromote(), osl::UUL, and osl::UUR.
Referenced by isCandidate().
bool osl::rating::Threatmate::isCandidate | ( | const NumEffectState & | state, |
Move | move | ||
) | [static] |
Definition at line 61 of file checkmate.cc.
References osl::alt(), captureForKnightCheck(), osl::Move::capturePtype(), osl::Move::capturePtypeO(), osl::Move::from(), osl::Move::isDrop(), osl::Neighboring8::isNeighboring8(), osl::KNIGHT, knight2Step(), osl::newPtypeO(), osl::PTYPE_EMPTY, osl::Move::ptypeO(), and osl::Move::to().
bool osl::rating::Threatmate::knight2Step | ( | const NumEffectState & | state, |
Move | move, | ||
Square | king | ||
) | [static] |
Definition at line 25 of file checkmate.cc.
References osl::KNIGHT, osl::playerToMul(), osl::Move::ptype(), osl::Move::to(), osl::Square::x(), and osl::Square::y().
Referenced by isCandidate().
bool osl::rating::Threatmate::match | ( | const NumEffectState & | state, |
Move | move, | ||
const RatingEnv & | |||
) | const [virtual] |