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