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