Go to the documentation of this file.
3 #ifndef _DISPROOFPIECES_H
4 #define _DISPROOFPIECES_H
17 assert(state.
turn() != defender);
30 if (result.
get(ptype) <
max.get(ptype))
void trySub(Ptype type)
1枚以上持っていれば減らす
static const PieceStand attack(const CheckMoveList &moves, const SimpleState &state, PieceStand max)
int max(Player p, int v1, int v2)
Ptype capturePtype() const
void add(Ptype type, unsigned int num=1)
PtypeO captured(PtypeO ptypeO)
unpromoteすると共に,ownerを反転する.
static void addMonopolizedPieces(const SimpleState &state, Player player, const PieceStand max, PieceStand &out)
alt(player) が持っていない種類の持駒を playerが持っていたら out に独占分を加算する.
constexpr bool isPiece(Ptype ptype)
ptypeが空白やEDGEでないかのチェック
static const PieceStand leaf(const SimpleState &state, Player defender, const PieceStand max)
static const PieceStand defense(const PieceStand prev, Move move, const PieceStand max)
unsigned int get(Ptype type) const
Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す