All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Functions
osl::move_classifier Namespace Reference

Moveを分類するクラス群. More...

Classes

struct  AttackDefenceAroundKing
 玉の周辺 5x5 の領域に利きをつける手 More...
struct  BlockLongEffect
 長い利きをブロックする手の判定. More...
struct  BlockLongAny
struct  Check
struct  Classifier
struct  ClassifierTraits
struct  DirectCheck
struct  KingOpenMove
 Pの王をopen checkにする手でないことをチェック. More...
struct  ClassifierTraits< KingOpenMove< P > >
struct  MoveAdaptor
struct  PlayerMoveAdaptor
struct  ConditionAdaptor
 drop の時は呼べないなどの条件を代わりにテスト More...
struct  OpenCheck
struct  ClassifierTraits< OpenCheck< P > >
struct  PawnDropCheckmate
 打歩詰の判定. More...
struct  SafeMove
 元々,手番の玉に王手がかかっていない状態で自殺手でないことをチェック. More...
struct  ClassifierTraits< SafeMove< P > >
struct  TrapRook

Functions

bool canAttackInThreeMoves (Player player, Ptype ptype, Square myPos, Square opKingPos)

Detailed Description

Moveを分類するクラス群.

標準インターフェース:

 template <Player P>
 struct XXX
 {
   static bool isMember(const NumEffectState& state, 
                        Ptype ptype,Square from,Square to)
 };

アダプタ: 標準インターフェースは使いにくいので,以下が用意されている.

 if (! move_classifier::PlayerMoveAdaptor<move_classifier::PawnDropCheckmate>::isMember(state, move)) {
   // もしも打歩詰じゃなかったら...
 }

Function Documentation

bool osl::move_classifier::canAttackInThreeMoves ( Player  player,
Ptype  ptype,
Square  myPos,
Square  opKingPos 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines