osl::checkmate::CheckmateIfCapture Struct Reference

`#include <checkmateIfCapture.h>`

## Classes

struct | CallDefense

## Static Public Member Functions

static bool | effectiveAttack (NumEffectState &state, Move move, int depth)
| move を指した後，alt(move.player())が取ると詰みかどうか.
static bool | cannotCapture (NumEffectState &state, Square last_to, int depth)
| 手番の側がSquare の駒を取っても詰みがないか．
static bool | effectiveAttackCandidate0 (const NumEffectState &state, Move move)
| depth==0でeffectiveAttackになる可能性がなければfalse

## Detailed Description

Definition at line 13 of file checkmateIfCapture.h.

## Member Function Documentation

## cannotCapture()

bool osl::checkmate::CheckmateIfCapture::cannotCapture | ( | NumEffectState & | state,
|  | Square | last_to,
|  | int | depth )

static

手番の側がSquare の駒を取っても詰みがないか．

- target に利きがない場合はfalse
- 取る指手が全て取ると詰の場合は true
  Parameters

    depth | 0 なら ImmediateCheckmate のみ，2なら3手詰．

Definition at line 132 of file checkmateIfCapture.cc.

References osl::alt(), osl::FixedCapacityVector< T, Capacity >::begin(), osl::NumEffectState::countEffect(), osl::FixedCapacityVector< T, Capacity >::empty(), osl::FixedCapacityVector< T, Capacity >::end(), osl::GenerateCapture::generate(), osl::NumEffectState::hasEffectByPiece(), osl::checkmate::FixedDepthSearcher::hasEscapeByMoveOfTurn(), osl::NumEffectState::inCheck(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::KING, osl::SimpleState::kingSquare(), osl::SimpleState::pieceOnBoard(), and osl::SimpleState::turn().

Referenced by osl::checkmate::CheckmateIfCapture::CallDefense::operator()().

## effectiveAttack()

bool osl::checkmate::CheckmateIfCapture::effectiveAttack | ( | NumEffectState & | state,
|  | Move | move,
|  | int | depth )

static

move を指した後，alt(move.player())が取ると詰みかどうか.

- alt(move.player()) から利きがない場合はfalse
- 取る指手が全て取ると詰の場合は true
  Parameters

    depth | 0 なら ImmediateCheckmate のみ，2なら3手詰．

Definition at line 119 of file checkmateIfCapture.cc.

References effectiveAttackCandidate0(), osl::NumEffectState::makeUnmakeMove(), osl::Move::player(), osl::checkmate::CheckmateIfCapture::CallDefense::result, and osl::SimpleState::turn().

Referenced by osl::move_probability::CheckmateIfCapture::hasSafeCapture(), and osl::rating::CheckmateIfCapture::match().

## effectiveAttackCandidate0()

bool osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0 | ( | const NumEffectState & | state,
|  | Move | move )

static

depth==0でeffectiveAttackになる可能性がなければfalse

Definition at line 20 of file checkmateIfCapture.cc.

References osl::alt(), osl::misc::GeneralMask< Integer >::any(), osl::PieceMask::any(), osl::Board_Table, osl::Piece::canMoveOn(), osl::captured(), osl::Move::capturePtype(), osl::NumEffectState::countEffect(), osl::checkmate::King8Info::dropCandidate(), osl::NumEffectState::effectSetAt(), osl::Move::from(), osl::Neighboring8Direct::hasEffect(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectByPiece(), osl::NumEffectState::hasEffectByPtypeStrict(), osl::NumEffectState::hasEffectNotBy(), osl::Neighboring8Direct::hasEffectOrAdditional(), osl::SimpleState::hasPieceOnStand(), osl::NumEffectState::inCheck(), osl::Move::isCapture(), osl::Move::isDrop(), osl::Piece::isEdge(), osl::Piece::isEmpty(), osl::Square::isNeighboring8(), osl::Piece::isOnBoardByOwner(), osl::NumEffectState::king8Info(), osl::SimpleState::kingSquare(), osl::KNIGHT, osl::checkmate::King8Info::liberty(), osl::NumEffectState::longEffectAt(), osl::checkmate::King8Info::moveCandidate2(), osl::container::PieceMask64::none(), osl::SimpleState::pieceAt(), osl::SimpleState::pieceOf(), osl::SimpleState::pieceOnBoard(), osl::NumEffectState::piecesOnBoard(), osl::Piece::ptypeO(), osl::Piece::square(), osl::container::PieceMask64::takeOneBit(), osl::Move::to(), osl::SimpleState::turn(), osl::unpromote(), osl::UUL, and osl::UUR.

Referenced by effectiveAttack(), and osl::rating::CheckmateIfCapture::match().

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

- checkmateIfCapture.h
- checkmateIfCapture.cc