3 #ifndef OSL_MOVE_CLASSIFIER_PAWNDROPCHECKMATE_H 4 #define OSL_MOVE_CLASSIFIER_PAWNDROPCHECKMATE_H 11 namespace move_classifier
37 const Piece king = state.template kingPiece<Opponent>();
53 return escape7(state, king_position, to);
59 template <osl::Player P>
77 if (! state.template hasEffectAt<P>(target, attacker))
81 assert(attacker.
owner() == P);
88 if (shortOffset.zero())
95 template <osl::Player P>
bool isOnBoardByOwner() const
piece がプレイヤーPの持ち物でかつボード上にある駒の場合は true.
bool hasEffectAt(Square target) const
対象とするマスにあるプレイヤーの利きがあるかどうか.
constexpr Player alt(Player player)
const PtypeO PTYPEO_EDGE __attribute__((unused))
const Piece pieceAt(Square sq) const
static const Piece EMPTY()
const Offset getShortOffsetNotKnight(Offset32 offset32) const
Longの利きの可能性のあるoffsetの場合は, 反復に使う offsetを Knight以外のShortの利きのoffsetの場合はそ...
Offset32Base< 8, 9 > Offset32
Piece safeCaptureNotByKing(Square target, Piece king) const
玉の素抜きなしに合法手でtargetに移動可能かを判定
uint64_t Iking8Info(Player king) const
const Square square() const
static bool escape7(const NumEffectState &state, Square kingSquare, Square to)
王が前以外に移動可能か
const Offset getOffset(Direction dir) const
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
static bool canEscape(const NumEffectState &state, Square kingSquare, Direction dir, Square dropAt)
kingSquare に居る alt(P)の玉が dir 方向に逃げられるか.
bool isPieceStand() const
bool isEdge() const
onBoardから8近傍のオフセットを足した点がedgeかどうかの判定 そこそこ速くなった.
const BoardTable Board_Table