20 attack(a),
self(s), target(t)
25 if (target != p.
ptype())
33 if (
self != move.
ptype())
40 if (
match(state, move, env, p))
53 return attack ? index : index + 1;
62 const int i =
index(state, move, env, attack, p);
int countEffect(Player player, Square target) const
利きの数を数える.
bool hasEffectIf(PtypeO ptypeo, Square attacker, Square target) const
attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる...
constexpr Player alt(Player player)
static int index(const NumEffectState &state, Move move, const RatingEnv &env, bool attack)
const Piece pieceOnBoard(Square sq) const
bool hasEffectByPiece(Piece attack, Square target) const
駒attack が target に利きを持つか (旧hasEffectToと統合)
PtypeO ptypeO() const
移動後のPtype, i.e., 成る手だった場合成った後
static int index(const NumEffectState &state, Move move, const RatingEnv &, bool attack, Piece p)
const char * getCsaName(Ptype ptype) const
const Piece pieceOf(int num) const
const PtypeTable Ptype_Table
bool match(const NumEffectState &, Move move, const RatingEnv &env) const
const Square from() const
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
mask_t getMaskLow(Ptype ptype) const
const Square square() const
int getIndex(Ptype) const
bool match(const NumEffectState &state, Move move, const RatingEnv &, Piece p) const
const mask_t getMask(int num) const
const std::string & name() const
PinAttack(bool a, Ptype s, Ptype t)
static const std::string name(bool attack, Ptype self, Ptype target)