3#ifndef OSL_MOVEACTION_H
4#define OSL_MOVEACTION_H
18 template <
size_t Capacity>
20 :
moves(v.pushBackHelper())
26 moves.push_back(move);
40 moves.push_back(move);
46 moves.push_back(move);
71 template<Player P,
class OrigAction>
81 action.simpleMove(from,to,ptype,isPromote,P,m);
85 action.unknownMove(from,to,p1,ptype,isPromote,P,m);
91 action.dropMove(to,ptype,P,m);
116 template<
class OrigAction>
126 action.simpleMove(from,to,ptype,isPromote,p,m);
130 action.unknownMove(from,to,p1,ptype,isPromote,p,m);
134 action.dropMove(to,ptype,p,m);
159 template<Player P,
class OrigAction>
180 action.simpleMove(from,to,ptype,isPromote,P,m);
191 action.unknownMove(from,to,p1,ptype,isPromote,P,m);
203 action.dropMove(to,ptype,P,m);
bool hasEffectIf(PtypeO ptypeo, Square attacker, Square target) const
attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.
NoAddEffectFilter(const NumEffectState &s, OrigAction &action, Square target)
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player p, Move m)
void unknownMove(Square from, Square to, Piece captured, Ptype ptype, bool isPromote, Player p)
void dropMove(Square to, Ptype ptype, Player p)
void unknownMove(Square from, Square to, Piece p1, Ptype ptype, bool isPromote, Player p, Move m)
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player p)
void dropMove(Square to, Ptype ptype, Player p, Move m)
const NumEffectState & state
NoEffectFilter(const NumEffectState &s, OrigAction &action, Square pos)
void dropMove(Square to, Ptype ptype, Player p)
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player p)
void unknownMove(Square from, Square to, Piece captured, Ptype ptype, bool isPromote, Player p)
void unknownMove(Square from, Square to, Piece p1, Ptype ptype, bool isPromote, Player, Move m)
void dropMove(Square to, Ptype ptype, Player, Move m)
const NumEffectState & state
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player, Move m)
constexpr Player alt(Player player)
PtypeO newPtypeO(Player player, Ptype ptype)
PtypeO captured(PtypeO ptypeO)
unpromoteすると共に,ownerを反転する.
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player p)
NotKingOpenFilter(const NumEffectState &s, OrigAction &action)
bool isNotKingOpenMove(Ptype ptype, Square from, Square to)
void dropMove(Square to, Ptype ptype, Player p)
void unknownMove(Square from, Square to, Piece captured, Ptype ptype, bool isPromote, Player p)
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player p, Move m)
void dropMove(Square to, Ptype ptype, Player p, Move m)
dropMoveが自殺手になることはない
const NumEffectState & state
void unknownMove(Square from, Square to, Piece p1, Ptype ptype, bool isPromote, Player p, Move m)
void dropMove(Square, Ptype, Player, Move move)
コマを打つMove
FixedCapacityVectorPushBack< Move > moves
Store(FixedCapacityVector< Move, Capacity > &v)
void dropMove(Square to, Ptype ptype, Player p)
void unknownMove(Square from, Square to, Piece captured, Ptype ptype, bool isPromote, Player p)
void unknownMove(Square, Square, Piece, Ptype, bool, Player, Move move)
void simpleMove(Square from, Square to, Ptype ptype, bool isPromote, Player p)
void simpleMove(Square, Square, Ptype, bool, Player, Move move)
コマをとらないMove
static bool isMember(const NumEffectState &state, Ptype, Square from, Square to)
king が59 rookが51->61の時,差は OFFSET -8 -> U OFFSET +8 -> D とはなるので,一直線のような気がする.ただし,そもとも, 59 - 51はpinにはならな...