14 while (direct.
any()) {
24template <
int count_max>
30 state.
findEffect(attack, target, direct_pieces);
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();
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
static bool isEmptyNum(int num)
Piece nextPiece(Square cur, Offset diff) const
diff方向にあるPiece を求める.
const Piece pieceOf(int num) const
const PtypeTable Ptype_Table
const BoardTable Board_Table
Offset32Base< 8, 9 > Offset32
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 の追加利きを二つまで数える.
static int count(const PieceVector &direct_pieces, const NumEffectState &state, Square target, Player attack)