EffectState を活用するためのメソッド NumSimpleEffect などの公開インターフェースで 使って書けるコード More...
#include <effectUtil.h>
Classes | |
| struct | FindThreat |
| struct | SafeCapture |
Public Member Functions | |
| 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 にいると仮定した時にの利きを列挙. | |
| 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に移動可能かを判定 | |
| 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 引数を通常の引数にしたバージョン | |
| static void | findEffect (Player P, const NumEffectState &state, Square target, container::PieceVector &out) |
| target に利きのあるPieceをoutに格納する | |
| template<class EvalT > | |
| static void | findThreat (const NumEffectState &state, Square position, PtypeO ptypeo, PieceVector &out) |
| state の position に ptypeo があった場合を仮定して,脅威をoutに集める | |
EffectState を活用するためのメソッド NumSimpleEffect などの公開インターフェースで 使って書けるコード
Definition at line 25 of file effectUtil.h.
| void osl::effect_util::EffectUtil::findEffect | ( | Player | P, |
| const NumEffectState & | state, | ||
| Square | target, | ||
| container::PieceVector & | out | ||
| ) | [static] |
target に利きのあるPieceをoutに格納する
Definition at line 12 of file effectUtil.cc.
References forEachEffect(), and store().
| static void osl::effect_util::EffectUtil::findThreat | ( | const NumEffectState & | state, |
| Square | position, | ||
| PtypeO | ptypeo, | ||
| PieceVector & | out | ||
| ) | [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().
| static void osl::effect_util::EffectUtil::forEachEffect | ( | Player | P, |
| const NumEffectState & | state, | ||
| Square | pos, | ||
| Action & | a | ||
| ) | [inline, static] |
forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン
| P | 探す対象の駒の所有者 |
| pos | に利きのある駒を探す |
Definition at line 63 of file effectUtil.h.
References osl::BLACK.
Referenced by findEffect().
| void osl::effect_util::EffectUtil::forEachEffectOfPtypeO | ( | const NumEffectState & | state, |
| Square | from, | ||
| PtypeO | ptypeo, | ||
| Function & | f | ||
| ) | [static] |
PtypeO が Square にいると仮定した時にの利きを列挙.
盤面が実際と違うと長い利きが不正確になる
| InterestEmpty | 空白のマスに興味があるか |
Definition at line 89 of file effectUtil.tcc.
References osl::BLACK, osl::getOwner(), and osl::getPtype().
| void osl::effect_util::EffectUtil::forEachEffectOfPtypeO | ( | const NumEffectState & | state, |
| Square | from, | ||
| Ptype | ptype, | ||
| Function & | f | ||
| ) | [static] |
Definition at line 63 of file effectUtil.tcc.
References osl::PtypeTable::getMoveMask(), and osl::Ptype_Table.
| osl::Piece osl::effect_util::EffectUtil::safeCaptureNotByKing | ( | const NumEffectState & | state, |
| Square | target, | ||
| Piece | king | ||
| ) | [static] |
玉の素抜きなしに合法手でtargetに移動可能かを判定
| 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.
| static Piece osl::effect_util::EffectUtil::safeCaptureNotByKing | ( | Player | P, |
| const NumEffectState & | state, | ||
| Square | target | ||
| ) | [inline, static] |
Definition at line 48 of file effectUtil.h.
References osl::BLACK, and target.
1.7.6.1