4 template <osl::Player P>
5 template <
bool hasException>
11 Square king_position=state.template kingSquare<P>();
12 if (king_position.isPieceStand())
17 assert(king_position != from);
29 if(!state.
isEmptyBetween(from,king_position,offset,
true))
return false;
32 for(pos-=offset;;pos-=offset){
34 if (! ((hasException && (pos == exceptFor))
bool isEmptyBetween(Square from, Square to, Offset offset, bool pieceExistsAtTo=false) const
bool isOnBoardByOwner() const
piece がプレイヤーPの持ち物でかつボード上にある駒の場合は true.
constexpr Player alt(Player player)
const Piece pieceAt(Square sq) const
static bool isMemberMain(const NumEffectState &state, Ptype ptype, Square from, Square to, Square exceptFor)
const Offset getShortOffsetNotKnight(Offset32 offset32) const
Longの利きの可能性のあるoffsetの場合は, 反復に使う offsetを Knight以外のShortの利きのoffsetの場合はそ...
Offset32Base< 8, 9 > Offset32
const PtypeTable Ptype_Table
bool isOnBoard() const
盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する. ...
const EffectContent getEffect(PtypeO ptypeo, Square from, Square to) const
fromにいるptypeoがtoに利きを持つか?
Pの王をopen checkにする手でないことをチェック.
bool isPieceStand() const
const BoardTable Board_Table