3#ifndef FEATURE_POSITION_H
4#define FEATURE_POSITION_H
56 return abs(move.
to().
x() - king.
x());
64 return abs(move.
from().
x() - king.
x());
93 int diff = move.
to().
y() - king.
y();
104 int diff = move.
from().
y() - king.
y();
127 static const std::string
name(
int x);
133 int mx = move.
to().
x();
149 static const std::string
name(
int y);
155 int my = move.
to().
y();
const Square from() const
const char * getCsaName(Ptype ptype) const
Square kingSquare() const
int y() const
将棋としてのY座標を返す.
int x() const
将棋としてのX座標を返す.
const std::string & name() const
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
RelativeKingX(int ix, int iox, bool a, Ptype p)
static int makeOldX(bool attack, const NumEffectState &state, Move move)
static int index(bool attack, const NumEffectState &state, Move move)
static int makeX(bool attack, const NumEffectState &state, Move move)
static int makeOldY(bool attack, const NumEffectState &state, Move move)
static int makeY(bool attack, const NumEffectState &state, Move move)
bool match(const NumEffectState &state, Move move, const RatingEnv &) const
RelativeKingY(int iy, int ioy, bool a, Ptype p)
static int index(bool attack, const NumEffectState &state, Move move)
bool match(const NumEffectState &, Move move, const RatingEnv &) const
static int makeX(Move move)
SquareX(int ix, Ptype ptype, bool drop)
static int makeY(Move move)
SquareY(int iy, Ptype ptype, bool drop)
bool match(const NumEffectState &, Move move, const RatingEnv &) const
const PtypeTable Ptype_Table
bool isBasic(Ptype ptype)
ptypeが基本型(promoteしていない)かのチェック
constexpr Player alt(Player player)
static std::string name(Ptype ptype, bool drop)
static int index(Move move)
DropPtype(Ptype p, bool d)