osl::move_classifier::PawnDropCheckmate< P > Struct Template Reference

打歩詰の判定. More...

`#include <pawnDropCheckmate.h>`

## Static Public Member Functions

static bool | canEscape (const NumEffectState &state, Square kingSquare, Direction dir, Square dropAt)
| kingSquare に居る alt(P)の玉が dir 方向に逃げられるか.
static bool | escape7 (const NumEffectState &state, Square kingSquare, Square to)
| 王が前以外に移動可能か
static bool | isMember (const NumEffectState &state, Ptype ptype, Square from, Square to)

## Detailed Description

template<Player P>
struct osl::move_classifier::PawnDropCheckmate< P >

打歩詰の判定.

Parameters

  P | 指手(攻撃)側

Definition at line 18 of file pawnDropCheckmate.h.

## Member Function Documentation

## canEscape()

template<osl::Player P>

bool osl::move_classifier::PawnDropCheckmate< P >::canEscape | ( | const NumEffectState & | state,
|  | Square | kingSquare,
|  | Direction | dir,
|  | Square | dropAt )

static

kingSquare に居る alt(P)の玉が dir 方向に逃げられるか.

Definition at line 64 of file pawnDropCheckmate.h.

References osl::alt(), osl::Board_Table, osl::Piece::EMPTY(), osl::Square::isEdge(), osl::Piece::isOnBoardByOwner(), osl::Piece::owner(), osl::SimpleState::pieceAt(), osl::Piece::square(), and osl::Offset::zero().

Referenced by escape7().

## escape7()

template<osl::Player P>

bool osl::move_classifier::PawnDropCheckmate< P >::escape7 | ( | const NumEffectState & | state,
|  | Square | kingSquare,
|  | Square | to )

static

王が前以外に移動可能か

Definition at line 100 of file pawnDropCheckmate.h.

References canEscape(), osl::D, osl::DL, osl::DR, osl::L, osl::R, osl::UL, and osl::UR.

Referenced by isMember().

## isMember()

template<Player P>

bool osl::move_classifier::PawnDropCheckmate< P >::isMember | ( | const NumEffectState & | state,
|  | Ptype | ptype,
|  | Square | from,
|  | Square | to )

inline static

Definition at line 28 of file pawnDropCheckmate.h.

References osl::alt(), osl::Piece::EMPTY(), escape7(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::Iking8Info(), osl::Square::isPieceStand(), osl::checkmate::King8Info::liberty(), osl::PAWN, osl::NumEffectState::safeCaptureNotByKing(), and osl::Piece::square().

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

- pawnDropCheckmate.h