32 return std::abs(piece.
square().
x() - king.
x()) * 17 +
34 (piece.
square().
y() - king.
y())) + 8;
50 template <Player Defense>
52 template <Player Defense>
100 template <Player King>
bool hasEffectByPtypeStrict(Player attack, Square target) const
target に ptype の利きがあるか? 成不成を区別
const Square square() const
bool isPawnMaskSet(Player player, int x) const
const Piece pieceAt(Square sq) const
int y() const
将棋としてのY座標を返す.
bool isOnBoard() const
盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する.
int x() const
将棋としてのX座標を返す.
static MultiInt evalOne(const NumEffectState &state)
static void setUp(const Weights &weights)
static CArray< MultiInt, ONE_DIM > table
static bool pawnAttack(const NumEffectState &state, Piece piece)
static CArray< MultiInt, 48 > pawn_table
static CArray< MultiInt, 560 > distance_table
static CArray< MultiInt, 80 > table
static MultiInt eval(const NumEffectState &state)
static MultiInt evalOne(const NumEffectState &state)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
static CArray2d< MultiInt, PTYPE_SIZE, 17 *9 > table
static void setUp(const Weights &weights, int stage)
static int index(const Square king, const Piece piece)
static CArray< int, PTYPE_SIZE > table
static void setUp(const Weights &weights)
constexpr Player alt(Player player)