62 for (
int dx=-1; dx<=1; ++dx) {
63 for (
int dy=-1; dy<=1; ++dy) {
64 if (dx == 0 && dy ==0)
72 if (king.
x() == 1 || king.
x() == 9)
74 return std::min(3,
count);
PtypeO ptypeO() const
移動後のPtype, i.e., 成る手だった場合成った後
const Square from() const
bool hasEffectByPiece(Piece attack, Square target) const
駒attack が target に利きを持つか (旧hasEffectToと統合)
bool hasEffectAt(Square target) const
対象とするマスにあるプレイヤーの利きがあるかどうか.
const Piece findAttackAt(Player attack, Square target) const
return a piece s.t.
const Square square() const
const Piece pieceOnBoard(Square sq) const
Square kingSquare() const
const Piece pieceAt(Square sq) const
bool isNeighboring8(Square to) const
int x() const
将棋としてのX座標を返す.
static Square findNearest(const NumEffectState &state, PtypeO ptypeo, Square from, Square target)
static bool hasEffect(const NumEffectState &state, PtypeO ptypeo, Square from, Square target)
ptypeo の駒がfromからtargetの8近傍に直接の利きを持つか
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
AttackKing8(Ptype s, Ptype t, bool ss, int attack, int defense)
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
static bool matchDrop(const NumEffectState &state, Move move)
static bool blocking(const NumEffectState &state, Square king, Square to)
DefenseKing8(Ptype s, bool d, int dan)
static bool matchMove(const NumEffectState &state, Move move)
static int count(const NumEffectState &state)
const std::string & name() const
constexpr bool isPiece(Ptype ptype)
ptypeが空白やEDGEでないかのチェック
constexpr Player alt(Player player)
PtypeO newPtypeO(Player player, Ptype ptype)
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)