1#ifndef OSL_EFFECT_ACTION
2#define OSL_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>
193 out->push_back(std::make_pair(ptypeO, p.
square()));
const Square square() const
bool isPromotedNotKingGold() const
AlwaysMove(const NumEffectState &s, Action &a)
const NumEffectState & state
void doAction(Piece p1, Square to)
Ptypeをtemplate引数にできない場合
void doActionPtype(Piece p1, Square to)
Ptypeをtemplate引数にできる場合
const PtypeTable Ptype_Table
bool canPromote(Ptype ptype)
ptypeがpromote可能な型かどうかのチェック promote済みの場合はfalseを返す
Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
Ptype promote(Ptype ptype)
promote可能なptypeに対して,promote後の型を返す promote不可のptypeを与えてはいけない.
static bool canDropTo(Square pos)
void doActionPtype(Piece p, Square pos)
void doAction(Piece p, Square)
StorePiece(PieceVector *s)
void doActionPtype(Piece p)
StorePtypeOSquare(PtypeOSquareVector *s, Square t)
void doAction(Piece p, Square)