EffectState を活用するためのメソッド NumSimpleEffect などの公開インターフェースで 使って書けるコード. [詳細]
#include <effectUtil.h>
構成 | |
| struct | FindThreat |
| struct | SafeCapture |
Public メソッド | |
| template<class EvalT > | |
| void | findThreat (const NumEffectState &state, Position position, PtypeO ptypeo, PieceVector &out) |
Static Public メソッド | |
| template<class Function , bool InterestEmpty> | |
| static void | forEachEffectOfPtypeO (const NumEffectState &state, Position, PtypeO, Function &f) |
| PtypeO が Position にいると仮定した時にの利きを列挙. | |
| template<Player P, class Function , bool InterestEmpty> | |
| static void | forEachEffectOfPtypeO (const NumEffectState &state, Position, Ptype, Function &f) |
| template<Player P> | |
| static Piece | safeCaptureNotByKing (const NumEffectState &state, Position target, Piece king) |
| 玉の素抜きなしに合法手でtargetに移動可能かを判定 | |
| static Piece | safeCaptureNotByKing (Player P, const NumEffectState &state, Position target) |
| template<class Action > | |
| static void | forEachEffect (Player P, const NumEffectState &state, Position pos, Action &a) |
| forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン | |
| static void | findEffect (Player P, const NumEffectState &state, Position target, container::PieceVector &out) |
| target に利きのあるPieceをoutに格納する | |
| template<class EvalT > | |
| static void | findThreat (const NumEffectState &state, Position position, PtypeO ptypeo, PieceVector &out) |
| state の position に ptypeo があった場合を仮定して,脅威をoutに集める | |
EffectState を活用するためのメソッド NumSimpleEffect などの公開インターフェースで 使って書けるコード.
effectUtil.h の 25 行で定義されています。
| static void osl::effect_util::EffectUtil::findEffect | ( | Player | P, | |
| const NumEffectState & | state, | |||
| Position | target, | |||
| container::PieceVector & | out | |||
| ) | [static] |
target に利きのあるPieceをoutに格納する
参照元 osl::effect_util::ShadowEffect::count(), osl::effect_util::AdditionalEffect::count(), と osl::effect_util::AdditionalEffect::find().
| void osl::effect_util::EffectUtil::findThreat | ( | const NumEffectState & | state, | |
| Position | position, | |||
| PtypeO | ptypeo, | |||
| PieceVector & | out | |||
| ) | [inline] |
effectUtil.cc の 78 行で定義されています。
参照先 osl::alt(), と osl::getOwner().
| static void osl::effect_util::EffectUtil::findThreat | ( | const NumEffectState & | state, | |
| Position | position, | |||
| PtypeO | ptypeo, | |||
| PieceVector & | out | |||
| ) | [inline, static] |
state の position に ptypeo があった場合を仮定して,脅威をoutに集める
| static void osl::effect_util::EffectUtil::forEachEffect | ( | Player | P, | |
| const NumEffectState & | state, | |||
| Position | pos, | |||
| Action & | a | |||
| ) | [inline, static] |
forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン
| P | 探す対象の駒の所有者 | |
| pos | に利きのある駒を探す |
effectUtil.h の 63 行で定義されています。
参照先 osl::BLACK.
| void osl::effect_util::EffectUtil::forEachEffectOfPtypeO | ( | const NumEffectState & | state, | |
| Position | from, | |||
| Ptype | ptype, | |||
| Function & | f | |||
| ) | [inline, static] |
effectUtil.tcc の 63 行で定義されています。
| void osl::effect_util::EffectUtil::forEachEffectOfPtypeO | ( | const NumEffectState & | state, | |
| Position | from, | |||
| PtypeO | ptypeo, | |||
| Function & | f | |||
| ) | [inline, static] |
PtypeO が Position にいると仮定した時にの利きを列挙.
盤面が実際と違うと長い利きが不正確になる
| InterestEmpty | 空白のマスに興味があるか |
effectUtil.tcc の 89 行で定義されています。
参照先 osl::BLACK, osl::getOwner(), と osl::getPtype().
| static Piece osl::effect_util::EffectUtil::safeCaptureNotByKing | ( | Player | P, | |
| const NumEffectState & | state, | |||
| Position | target | |||
| ) | [inline, static] |
effectUtil.h の 48 行で定義されています。
参照先 osl::BLACK.
| osl::Piece osl::effect_util::EffectUtil::safeCaptureNotByKing | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Piece | king | |||
| ) | [inline, static] |
玉の素抜きなしに合法手でtargetに移動可能かを判定
| king | 玉 (玉で取る手は考えない) |
effectUtil.tcc の 120 行で定義されています。
参照先 osl::Piece::isPiece(), osl::KING, osl::Piece::number(), osl::Piece::owner(), osl::Piece::ptype(), と osl::effect_util::EffectUtil::SafeCapture::safe_one.
1.6.3