1#ifndef OSL_EFFECT_ACTION
2#define OSL_EFFECT_ACTION
7 namespace effect_action
12 template<
class Action>
23 template<Player P,Ptype Type>
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>
void push_back(const T &e)
const Square square() const
bool isPromotedNotKingGold() const
bool isBetterToPromote(Ptype ptype) const
bool canDropTo(Player pl, Ptype ptype, Square pos) const
const Piece pieceAt(Square sq) 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を与えてはいけない.
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)