EffectState を活用するためのメソッド NumSimpleEffect などの公開インターフェースで 使って書けるコード More...
#include <effectUtil.h>
Classes | |
struct | FindThreat |
struct | SafeCapture |
Public Member Functions | |
template<osl::Player P, class Function , bool InterestEmpty> | |
void | forEachEffectOfPtypeO (const NumEffectState &state, Square from, Ptype ptype, Function &f) |
template<class Function , bool InterestEmpty> | |
void | forEachEffectOfPtypeO (const NumEffectState &state, Square from, PtypeO ptypeo, Function &f) |
template<osl::Player P> | |
osl::Piece | safeCaptureNotByKing (const NumEffectState &state, Square target, Piece king) |
template<class EvalT > | |
void | findThreat (const NumEffectState &state, Square position, PtypeO ptypeo, PieceVector &out) |
Static Public Member Functions | |
template<class Function , bool InterestEmpty> | |
static void | forEachEffectOfPtypeO (const NumEffectState &state, Square, PtypeO, Function &f) |
PtypeO が Square にいると仮定した時にの利きを列挙. More... | |
template<Player P, class Function , bool InterestEmpty> | |
static void | forEachEffectOfPtypeO (const NumEffectState &state, Square, Ptype, Function &f) |
template<Player P> | |
static Piece | safeCaptureNotByKing (const NumEffectState &state, Square target, Piece king) |
玉の素抜きなしに合法手でtargetに移動可能かを判定 More... | |
static Piece | safeCaptureNotByKing (Player P, const NumEffectState &state, Square target) |
template<class Action > | |
static void | forEachEffect (Player P, const NumEffectState &state, Square pos, Action &a) |
forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン More... | |
static void | findEffect (Player P, const NumEffectState &state, Square target, container::PieceVector &out) |
target に利きのあるPieceをoutに格納する More... | |
template<class EvalT > | |
static void | findThreat (const NumEffectState &state, Square position, PtypeO ptypeo, PieceVector &out) |
state の position に ptypeo があった場合を仮定して,脅威をoutに集める More... | |
EffectState を活用するためのメソッド NumSimpleEffect などの公開インターフェースで 使って書けるコード
Definition at line 25 of file effectUtil.h.
|
static |
target に利きのあるPieceをoutに格納する
Definition at line 12 of file effectUtil.cc.
References forEachEffect(), and store().
|
static |
state の position に ptypeo があった場合を仮定して,脅威をoutに集める
template void osl::EffectUtil::findThreat< PieceEval > | ( | const NumEffectState & | state, |
Square | position, | ||
PtypeO | ptypeo, | ||
PieceVector & | out | ||
) |
Definition at line 170 of file effectUtil.tcc.
References osl::alt(), and osl::getOwner().
|
inlinestatic |
forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン
P | 探す対象の駒の所有者 |
pos | に利きのある駒を探す |
Definition at line 63 of file effectUtil.h.
References osl::BLACK.
Referenced by findEffect().
|
static |
void osl::effect_util::EffectUtil::forEachEffectOfPtypeO | ( | const NumEffectState & | state, |
Square | from, | ||
Ptype | ptype, | ||
Function & | f | ||
) |
Definition at line 63 of file effectUtil.tcc.
References osl::PtypeTable::getMoveMask(), osl::Ptype_Table, osl::effect_util::TestEffectOfMove< P, InterestEmpty, Dir >::testLong(), and osl::effect_util::TestEffectOfMove< P, InterestEmpty, Dir >::testShort().
void osl::effect_util::EffectUtil::forEachEffectOfPtypeO | ( | const NumEffectState & | state, |
Square | from, | ||
PtypeO | ptypeo, | ||
Function & | f | ||
) |
Definition at line 89 of file effectUtil.tcc.
References osl::BLACK, osl::getOwner(), and osl::getPtype().
|
static |
玉の素抜きなしに合法手でtargetに移動可能かを判定
king | 玉 (玉で取る手は考えない) |
|
inlinestatic |
Definition at line 48 of file effectUtil.h.
References osl::BLACK, and target.
osl::Piece osl::effect_util::EffectUtil::safeCaptureNotByKing | ( | const NumEffectState & | state, |
Square | target, | ||
Piece | king | ||
) |
Definition at line 121 of file effectUtil.tcc.
References osl::Piece::isPiece(), osl::KING, osl::Piece::number(), osl::Piece::owner(), osl::Piece::ptype(), osl::effect_util::EffectUtil::SafeCapture::safe_one, and target.