Moveを分類するクラス群. [詳細]
構成 | |
struct | AttackDefenceAroundKing |
玉の周辺 5x5 の領域に利きをつける手
| |
struct | BlockLongEffect |
長い利きをブロックする手の判定. [詳細] | |
struct | BlockLongAny |
struct | Check |
struct | ClassifierTraits |
struct | DirectCheck |
struct | KingOpenMove |
Pの王をopen checkにする手でないことをチェック. [詳細] | |
struct | ClassifierTraits< KingOpenMove< P > > |
struct | MoveAdaptor |
struct | PlayerMoveAdaptor |
struct | ConditionAdaptor |
drop の時は呼べないなどの条件を代わりにテスト [詳細] | |
struct | OpenCheck |
struct | ClassifierTraits< OpenCheck< P > > |
struct | PawnDropCheckmate |
打歩詰の判定. [詳細] | |
struct | SafeMove |
元々,手番の玉に王手がかかっていない状態で自殺手でないことをチェック. [詳細] | |
struct | ClassifierTraits< SafeMove< P > > |
struct | TrapRook |
関数 | |
bool | canAttackInThreeMoves (Player player, Ptype ptype, Position myPos, Position opKingPos) |
static bool | isSafeMove (NumEffectState &state, Move move) |
Moveを分類するクラス群.
標準インターフェース:
template <Player P> struct XXX { template <class State> static bool isMember(const State& state, Ptype ptype,Position from,Position to) };
アダプタ: 標準インターフェースは使いにくいので,以下が用意されている.
if (! move_classifier::PlayerMoveAdaptor<move_classifier::PawnDropCheckmate>::isMember(state, move)) { // もしも打歩詰じゃなかったら... }
bool osl::move_classifier::canAttackInThreeMoves | ( | Player | player, | |
Ptype | ptype, | |||
Position | myPos, | |||
Position | opKingPos | |||
) |
canAttackInNMoves.cc の 5 行で定義されています。
参照先 canAttackInThreeMovesTable, osl::Position::index(), と osl::Position::positionForBlack().
static bool osl::move_classifier::isSafeMove | ( | NumEffectState & | state, | |
Move | move | |||
) | [inline, static] |