84 if (!
p.first.isPiece())
96 if (!
p.first.isPiece())
100 const std::string
name()
const;
119 const std::string
name()
const;
186 && pp.second.canPromote(pp.first.isPiece() ?
alt(pp.first.owner()) :
alt(move.
player()))
const Offset getOffset(Direction dir) const
const Square nextSquare(Player P, Square pos, Direction dr) const
next position from pos for player P.
const Square from() const
const Square square() const
static const Piece EMPTY()
Piece nextPiece(Square cur, Offset diff) const
diff方向にあるPiece を求める.
const Piece pieceAt(Square sq) const
const std::string & name() const
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
static const PieceSquare find(const NumEffectState &state, Move move, Ptype attacker_ptype)
static const Piece find(const NumEffectState &state, Move move, Direction direction)
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
static const PieceSquare nextPieceOrEnd(const SimpleState &state, Square start, Player player, Direction direction)
direction方向に空白を進み、駒を探す
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
static const PieceSquare find(const NumEffectState &state, Move move, Direction direction)
static Square nextSquare(Player player, Square start, Direction direction, Direction direction2)
Pattern(Direction d, Ptype s, Ptype t, bool ss, int attack, int defense)
static Square nextSquare(Move move, Direction direction, Direction direction2)
static const Direction INVALID
Pattern(Direction d, Direction d2, Ptype s, Ptype t, bool ss, int attack, int defense)
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
std::pair< Piece, Square > PieceSquare
const BoardTable Board_Table
constexpr bool isPiece(Ptype ptype)
ptypeが空白やEDGEでないかのチェック
constexpr Player alt(Player player)
bool match(const NumEffectState &state, Square position, const RatingEnv &env) const
static std::pair< int, int > count(const NumEffectState &state, Square position, const RatingEnv &env)
LongTarget2(Ptype t, bool s)
const std::string name() const
bool match(const NumEffectState &, Move move, Piece p) const
bool matchOtherThanPromotable(const NumEffectState &state, Move move, PieceSquare p, const RatingEnv &env) const
static bool isPromotable(Move move, Square position)
bool match(const NumEffectState &state, Move move, PieceSquare p, const RatingEnv &env) const
LongTarget(Ptype t, bool p, bool s, int attack, int defense)
const std::string name() const