1 #ifndef OSL_EFFECT_ACTION 2 #define OSL_EFFECT_ACTION 7 namespace effect_action
12 template<
class Action>
23 template<Player P,Ptype Type>
35 ac.unknownMove(from,to,state.
pieceAt(to),p1.
ptype(),
false,P);
53 ac.unknownMove(from,to,state.
pieceAt(to),ptype,
false,P);
59 ac.unknownMove(from,to,state.
pieceAt(to),ptype,
false,P);
63 ac.unknownMove(from,to,state.
pieceAt(to),ptype,
false,P);
68 ac.unknownMove(from,to,state.
pieceAt(to),ptype,
false,P);
71 bool done()
const{
return false; }
77 template<
class Action>
88 template<Player P,Ptype Type>
96 ac.unknownMove(from,to,target,
promote(Type),
true,P);
105 ac.unknownMove(from,to,target,p1.
ptype(),
false,P);
121 ac.unknownMove(from,to,target,
promote(ptype),
true,P);
128 ac.unknownMove(from,to,target,ptype,
false,P);
134 ac.unknownMove(from,to,target,
promote(ptype),
true,P);
138 ac.unknownMove(from,to,target,ptype,
false,P);
143 ac.unknownMove(from,to,target,ptype,
false,P);
156 template<Player P,Ptype Type>
179 template<Player P,Ptype Type>
198 #endif // OSL_EFFECT_ACTION Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す ...
void push_back(const T &e)
AlwaysMove(const NumEffectState &s, Action &a)
void doActionPtype(Piece p)
const Piece pieceAt(Square sq) const
void doAction(Piece p, Square)
void doAction(Piece p, Square)
void doActionPtype(Piece p, Square pos)
Ptype promote(Ptype ptype)
promote可能なptypeに対して,promote後の型を返す promote不可のptypeを与えてはいけない. ...
StorePiece(PieceVector *s)
const PtypeTable Ptype_Table
void doActionPtype(Piece p1, Square to)
Ptypeをtemplate引数にできる場合
static bool canDropTo(Square pos)
StorePtypeOSquare(PtypeOSquareVector *s, Square t)
bool canDropTo(Player pl, Ptype ptype, Square pos) const
const NumEffectState & state
bool canPromote(Ptype ptype)
ptypeがpromote可能な型かどうかのチェック promote済みの場合はfalseを返す
void doAction(Piece p1, Square to)
Ptypeをtemplate引数にできない場合
const Square square() const
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
bool isPromotedNotKingGold() const
bool isBetterToPromote(Ptype ptype) const