115 return diagonal*2+vertical;
207 std::swap(rook1, rook2);
const Square nextSquare(Player P, Square pos, Direction dr) const
next position from pos for player P.
PtypeO ptypeO() const
移動後のPtype, i.e., 成る手だった場合成った後
Ptype capturePtype() const
bool isNormal() const
INVALID でも PASS でもない.
const Square from() const
bool hasEffectAt(Square target) const
対象とするマスにあるプレイヤーの利きがあるかどうか.
bool hasEffectIf(PtypeO ptypeo, Square attacker, Square target) const
attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.
const Piece findAttackAt(Player attack, Square target) const
return a piece s.t.
bool hasEffectByPtype(Player attack, Square target) const
target に ptype の利きがあるか? 成不成を区別しない
const Square square() const
const Piece pieceOnBoard(Square sq) const
bool hasPieceOnStand(Player player, Ptype ptype) const
const Piece pieceOf(int num) const
bool isPawnMaskSet(Player player, int x) const
bool isPieceStand() const
int y() const
将棋としてのY座標を返す.
int x() const
将棋としてのX座標を返す.
bool hasLastMove(size_t last=1) const
const Move lastMove(size_t last=1) const
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
static bool basicMatch(const NumEffectState &state, Move move, Square front)
bool effectiveInCheck() const
static int count(const NumEffectState &state, Square position, Player player)
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
Chase(Ptype s, Ptype t, bool d, OpponentType o)
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
OpponentType opponent_type
static bool openLong(const NumEffectState &state, Move move)
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
bool effectiveInCheck() const
static const CArray< const char *, 4 > check_property
Feature(const std::string &name)
virtual bool effectiveInCheck() const
const std::string & name() const
virtual bool match(const NumEffectState &state, Move, const RatingEnv &) const =0
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
static int index(const NumEffectState &state, Move move)
bool effectiveInCheck() const
bool match(const NumEffectState &, Move move, const RatingEnv &env) const
bool match(const NumEffectState &state, Move move, const RatingEnv &env) const
bool match(const NumEffectState &, Move move, const RatingEnv &env) const
bool match(const NumEffectState &, Move move, const RatingEnv &env) const
bool effectiveInCheck() const
bool match(const NumEffectState &, Move move, const RatingEnv &env) const
virtual bool effectiveInCheck() const
const BoardTable Board_Table
constexpr int sign(Player player)
constexpr Player alt(Player player)
bool isMember(Square position) const
static int index(const NumEffectState &state, Player player, Square from)