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