Go to the documentation of this file.
14 while (direct.any()) {
19 if(!Piece::isEmptyNum(num1) && state.
pieceOf(num1).
owner()==attack)
return true;
24 template <
int count_max>
30 state.
findEffect(attack, target, direct_pieces);
31 return AdditionalOrShadow::count<count_max>
32 (direct_pieces, state, target, attack);
39 return count<1>(state, target, attack);
46 return count<2>(state, target, attack);
54 for (
Piece p: direct_effects)
88 find(state, target, direct_pieces, black, white);
90 direct_pieces.
clear();
92 find(state, target, direct_pieces, black, white);
97 int& black,
int& white)
100 find(state, target, black_pieces, white_pieces);
101 black = black_pieces.
size();
102 white = white_pieces.
size();
static bool hasEffect(const NumEffectState &, Square target, Player attack)
target に attack の追加利きが一つでもあるか. 相手の影利きが先にある場合は対象としない.
const PieceMask & piecesOnBoard(Player p) const
const BoardTable Board_Table
const EffectContent getEffect(PtypeO ptypeo, Square from, Square to) const
fromにいるptypeoがtoに利きを持つか?
const NumBitmapEffect effectSetAt(Square sq) const
Offset32Base< 8, 9 > Offset32
const EffectedNumTable & longEffectNumTable() const
Direction getShort8(Square from, Square to) const
Piece nextPiece(Square cur, Offset diff) const
diff方向にあるPiece を求める.
static void find(const NumEffectState &, Square target, const PieceVector &direct_effects, PieceVector &black, PieceVector &white)
const PtypeTable Ptype_Table
const Piece pieceOf(int num) const
const PieceMask promotedPieces() const
const Offset getShortOffsetNotKnight(Offset32 offset32) const
Longの利きの可能性のあるoffsetの場合は, 反復に使う offsetを Knight以外のShortの利きのoffsetの場合はそれ自身を返す.
static int count2(const NumEffectState &, Square target, Player attack)
target に attack の追加利きを二つまで数える.
static bool hasEffectStable(const NumEffectState &, Square target, Player attack)
bool hasEffect() const
短い利きがあるか,間がemptyなら長い利きがある
const Square square() const
static int count(const NumEffectState &, Square target, Player attack)
void findEffect(Player P, Square target, PieceVector &out) const
target に利きのあるPieceをoutに格納する
void clearBit()
unpromote(PTYPE) の駒のbit を消す
void push_back(const T &e)