構造体 osl::effect_util::EffectUtil

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.h25 行で定義されています。


関数

static void osl::effect_util::EffectUtil::findEffect ( Player  P,
const NumEffectState &  state,
Position  target,
container::PieceVector out 
) [static]
template<class EvalT >
void osl::effect_util::EffectUtil::findThreat ( const NumEffectState &  state,
Position  position,
PtypeO  ptypeo,
PieceVector &  out 
) [inline]

effectUtil.cc78 行で定義されています。

参照先 osl::alt(), と osl::getOwner().

template<class EvalT >
static void osl::effect_util::EffectUtil::findThreat ( const NumEffectState &  state,
Position  position,
PtypeO  ptypeo,
PieceVector &  out 
) [inline, static]

state の position に ptypeo があった場合を仮定して,脅威をoutに集める

template<class Action >
static void osl::effect_util::EffectUtil::forEachEffect ( Player  P,
const NumEffectState &  state,
Position  pos,
Action &  a 
) [inline, static]

forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン

引数:
P 探す対象の駒の所有者
pos に利きのある駒を探す

effectUtil.h63 行で定義されています。

参照先 osl::BLACK.

template<osl::Player P, class Function , bool InterestEmpty>
void osl::effect_util::EffectUtil::forEachEffectOfPtypeO ( const NumEffectState &  state,
Position  from,
Ptype  ptype,
Function &  f 
) [inline, static]

effectUtil.tcc63 行で定義されています。

参照先 osl::PtypeTable::getMoveMask(), と osl::Ptype_Table.

template<class Function , bool InterestEmpty>
void osl::effect_util::EffectUtil::forEachEffectOfPtypeO ( const NumEffectState &  state,
Position  from,
PtypeO  ptypeo,
Function &  f 
) [inline, static]

PtypeO が Position にいると仮定した時にの利きを列挙.

盤面が実際と違うと長い利きが不正確になる

引数:
InterestEmpty 空白のマスに興味があるか

effectUtil.tcc89 行で定義されています。

参照先 osl::BLACK, osl::getOwner(), と osl::getPtype().

static Piece osl::effect_util::EffectUtil::safeCaptureNotByKing ( Player  P,
const NumEffectState &  state,
Position  target 
) [inline, static]

effectUtil.h48 行で定義されています。

参照先 osl::BLACK.

template<osl::Player P>
osl::Piece osl::effect_util::EffectUtil::safeCaptureNotByKing ( const NumEffectState &  state,
Position  target,
Piece  king 
) [inline, static]

玉の素抜きなしに合法手でtargetに移動可能かを判定

引数:
king 玉 (玉で取る手は考えない)
戻り値:
移動可能な駒があれば,安全な駒を一つ.なければ Piece::EMPTY()
参照:
osl::move_classifier::PawnDropCheckmate

effectUtil.tcc120 行で定義されています。

参照先 osl::Piece::isPiece(), osl::KING, osl::Piece::number(), osl::Piece::owner(), osl::Piece::ptype(), と osl::effect_util::EffectUtil::SafeCapture::safe_one.


この構造体の説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義
Sun May 16 09:57:59 2010に生成されました。  doxygen 1.6.3