19 std::ostringstream os;
26 std::ostringstream os;
28 << (
same ?
"=" :
"!");
44 assert(! diff.
zero());
50 return std::make_pair(p, cur);
54 return std::make_pair(p, cur);
69 if (p.second == move.
from())
76 std::ostringstream os;
92 std::ostringstream os;
114 }
else if (ap ==
BISHOP) {
120 }
else if (ap ==
ROOK) {
const Square from() const
const Piece findAttackAt(Player attack, Square target) const
return a piece s.t.
static const Piece EMPTY()
static const Piece EDGE()
const Piece pieceOnBoard(Square sq) const
const Piece pieceAt(Square sq) const
static const Square STAND()
bool isOnBoard() const
盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する.
Feature(const std::string &name)
const std::string & name() const
PatternBlock(Ptype s, Ptype a, LongTarget t)
static const PieceSquare find(const NumEffectState &state, Move move, Ptype attacker_ptype)
PatternLong2(Direction d, Ptype s, LongTarget2 t2)
static const std::string name(Direction d, Ptype self)
static const std::string name(Direction d, Ptype self)
PatternLong(Direction d, Ptype s, LongTarget t)
static const PieceSquare nextPieceOrEnd(const SimpleState &state, Square start, Player player, Direction direction)
direction方向に空白を進み、駒を探す
static const PieceSquare find(const NumEffectState &state, Move move, Direction direction)
static const Direction INVALID
std::pair< Piece, Square > PieceSquare
const PtypeTable Ptype_Table
Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す
const BoardTable Board_Table
Offset32Base< 8, 9 > Offset32
constexpr Player alt(Player player)
static std::string name(int attack, int defense)
const std::string name() const
const std::string name() const