クラス osl::state::NumEffectState

利きを持つ局面

[詳細]

#include <numEffectState.h>

osl::state::NumEffectStateに対する継承グラフ
Inheritance graph
[凡例]
osl::state::NumEffectStateのコラボレーション図
Collaboration graph
[凡例]

すべてのメンバ一覧

Public メソッド

const PieceMask & getOnBoardMask (Player p) const
bool isOnBoardNum (int num) const
template<Player P, Ptype T, typename F >
void forEachOnBoard (F &func) const
 T は isBasic でなくても動くが unpromote(T) の結果と同じ.
template<Player P, Ptype T, typename F >
void forEachOnBoardPtypeStrict (F &func) const
 T の成不成を区別.
 NumEffectState (const state::SimpleState &st=SimpleState(HIRATE))
 ~NumEffectState ()
NumBitmapEffect getEffect (Position pos) const
Position getMobility (Direction d, int num) const
void setMobility (Direction d, int num, Position pos)
Position kingMobilityAbs (Player p, Direction d) const
Position kingMobilityOfPlayer (Player p, Direction d) const
 玉がd方向にどこまで動けるかを返す
const EffectedNumTable & longEffectNumTable () const
const Piece longEffectOfDirection (Player owner, int piece, Direction d) const
 pieceのd方向から長い利きがある場合にその駒を返す。
const Piece longEffectOfDirection (Player owner, Piece piece, Direction d) const
const Piece longEffectOfDirection (Piece piece, Direction d) const
const Piece longEffectOfDirection (Position square, Direction d) const
template<Ptype PTYPE>
const mask_t effectBit (Player P, Position target) const
const mask_t effectBit (Player P, Ptype ptype, Position target) const
template<Ptype PTYPE>
const mask_t selectLong (Position target) const
template<Ptype PTYPE>
const mask_t selectLong (Position target, Player owner) const
const mask_t selectLong (Position target, Player owner) const
const BoardMask changedEffects (Player pl) const
const BoardMask changedEffects () const
const NumBitmapEffect changedPieces () const
template<Ptype PTYPE>
bool longEffectChanged () const
template<Ptype PTYPE>
bool anyEffectChanged () const
PieceMask pin (Player king) const
PieceMask pinOrOpen (Player king) const
uint64_t Iking8Info (Player king) const
const checkmate::King8Info king8Info (Player king) const
const PieceMask promotedPieces () const
void makePinOpen (Player defense)
template<Player P>
void makeKing8Info ()
bool isConsistent (bool showError=true) const
bool isConsistent (const NumEffectState &prev, Move moved, bool show_error=true) const
 局面更新に関する一貫性をテスト
void doSimpleMove (Position from, Position to, int promoteMask)
void doDropMove (Position to, Ptype ptype)
void doCaptureMove (Position from, Position to, Piece target, int promoteMask)
template<Direction Dir, Player P>
bool hasEffectDir (Position to) const
 あるマスにあるDirectionでの長い利きがあるかどうか.
template<Ptype PTYPE>
bool hasEffectLong (Player P, Position to) const
 あるマスにPTYPEの長い利きがあるかどうか.
bool hasEffectBy (Player player, Position target) const
 対象とするマスにあるプレイヤーの利きがあるかどうか.
template<Player P>
bool hasEffectByNotPinned (Position target) const
 pinされている駒以外からの利きがない
bool hasEffectNotBy (Player player, Piece piece, Position target) const
 対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.
bool hasEffectNotMask (Player player, Position target, PieceMask const &notMask) const
 対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.
bool hasMultipleEffectBy (Player player, Position target) const
 二つ以上の駒から利きがある.
bool hasEffectByPiece (Piece attack, Position target) const
 駒attack が target に利きを持つか (旧hasEffectToと統合)
template<Ptype PTYPE>
bool hasEffectByPtype (Player attack, Position target) const
 target に ptype の利きがあるか? 成不成を区別しない
template<Ptype PTYPE>
bool hasEffectByPtypeStrict (Player attack, Position target) const
 target に ptype の利きがあるか? 成不成を区別
template<Ptype PTYPE>
const Piece effectPtype (Player attack, Position target) const
 return a piece s.t.
template<Ptype PTYPE>
const Piece effectPtypeStrict (Player attack, Position target) const
int countEffect (Player player, Position target) const
 利きの数を数える.
int countEffect (Player player, Position target, PieceMask pins) const
 利きの数を数える.
template<Player P, Ptype Type, class Action >
void forEachEffectPtype (Position pos, Action &action) const
template<Player P, class Action >
void forEachEffect (Position pos, Action &action) const
 pos への利きを持つ各駒に関して処理を行う.
template<Player P, class Action >
void forEachEffect (Position pos, Action &action, const PieceMask &pin) const
 pos にある駒を取る move を生成して action の member を呼び出す.
template<Player P, class Action >
void forEachEffectNotBy (Position pos, Piece piece, Action &action) const
 pos に移動する move を生成して action の member を呼び出す
template<Player P>
bool hasEffectBy (Position target) const
 対象とするマスにあるプレイヤーの利きがあるかどうか.
bool hasEffectBy (Player P, Position target, Piece &attackerPiece) const
template<Player P>
bool hasEffectBy (Position target, Piece &attackerPiece) const
const Piece selectCheapPiece (PieceMask effect) const
 利きの中から安そうな駒を選ぶ
const Piece findCheapThreat (Player P, Position square) const
const Piece findCheapThreatNotBy (Player P, Position square, const PieceMask &ignore) const
const Piece findThreatNotBy (Player P, Position square, const PieceMask &ignore) const
const Piece findThreatenedPiece (Player P) const
 取られそうなPの駒で価値が最大のもの
bool inCheck (Player P) const
 Pの玉が王手状態.
bool inCheck () const
 手番の玉が王手状態
template<Player P>
bool findCheckPiece (Piece &attack_piece) const
 王手駒を探す
template<bool show_error>
bool isAlmostValidMove (Move move) const
 合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
bool isAlmostValidMove (Move move, bool show_error=true) const
 合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
template<Player P, Ptype Type, class Action >
void forEachEffectOfPiece (Position piecePosition, Action &action) const
 piecePositionにある駒によって利きを受けるすべてのposition (空白含む)について actionを実行する
template<class Action >
void forEachEffectOfPiece (Piece piece, Action &action) const
bool hasEffectFromTo (PtypeO ptypeo, Position attacker, Position target) const
 attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.
template<Player P>
bool hasEffectByWithRemove (Position target, Position removed) const
bool hasEffectByWithRemove (Player player, Position target, Position removed) const
void showEffect (std::ostream &os) const
const PieceMask effectedMask (Player pl) const
 pl からの利きが(1つ以上)ある駒一覧
const PieceMask effectedChanged (Player pl) const
 前の指手でeffectedMask(pl)が変化したか.
void makeMovePass ()
template<Player P>
Direction pinnedDir (Piece p) const
 pinされた駒がPのKingから見てどの方向か? Pから見たdirectionを返す
template<Player P>
bool pinnedCanMoveTo (Piece p, Position to) const
 pinされた駒pがtoに動けるか? pinに関係がなければtoへ動けるという前提
template<class Action >
void forEachEffectOfPiece (Piece piece, Action &action) const
template<osl::Player P, osl::Ptype Type, class Action >
void forEachEffectOfPiece (Position piecePosition, Action &action) const
template<osl::Player P>
bool hasEffectByWithRemove (Position target, Position removed) const

Private 型

typedef NumEffectState state_t

Private メソッド

PieceMask & mutableOnBoardMask (Player p)
template<Direction DIR>
void makePinOpenDir (Position target, PieceMask &pins, PieceMask const &onBoard, Player defense)
void recalcPinOpen (Position changed, Direction &lastDir, Player defense)
PieceMask makePinOpen (Position target, Player defense)
template<Player P, class Action >
void forEachEffect (const PieceMask &pieces, Position pos, Action &action) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceDir (Position, Action &, Int2Type< false >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceDir (Position piecePosition, Action &action, Int2Type< true >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceDir (Position piecePosition, Action &action) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceLongDir (Position, Action &, Int2Type< false >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceLongDir (Position piecePosition, Action &action, Int2Type< true >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceLongDir (Position piecePosition, Action &action) const

Private 変数

effect::NumSimpleEffectTable effects
CArray< PieceMask, 2 > onBoardMask
PieceMask promoted
 成駒一覧
CArray< PieceMask, 2 > pin_or_open
KingMobility king_mobility
CArray< uint64_t, 2 > king8infos

フレンド

class apply_move::ApplyDoUndoSimpleMove< BLACK, NumEffectState >
class apply_move::ApplyDoUndoCaptureMove< BLACK, NumEffectState >
class apply_move::ApplyDoUndoDropMove< BLACK, NumEffectState >
class apply_move::ApplyDoUndoSimpleMove< WHITE, NumEffectState >
class apply_move::ApplyDoUndoCaptureMove< WHITE, NumEffectState >
class apply_move::ApplyDoUndoDropMove< WHITE, NumEffectState >
class osl::misc::FastCopier
bool operator== (const NumEffectState &st1, const NumEffectState &st2)
 駒番に依存した局面(インスタンス)比較をする.

説明

利きを持つ局面

numEffectState.h33 行で定義されています。


型定義

osl::state::SimpleStateを再定義しています。

numEffectState.h47 行で定義されています。


コンストラクタとデストラクタ

osl::state::NumEffectState::NumEffectState ( const state::SimpleState st = SimpleState(HIRATE)  )  [explicit]
osl::state::NumEffectState::~NumEffectState (  ) 

numEffectState.cc80 行で定義されています。


関数

template<Ptype PTYPE>
bool osl::state::NumEffectState::anyEffectChanged (  )  const [inline]

numEffectState.h195 行で定義されています。

参照先 changedPieces().

const BoardMask osl::state::NumEffectState::changedEffects (  )  const [inline]

numEffectState.h184 行で定義されています。

参照先 osl::BLACK, と osl::WHITE.

参照元 isConsistent().

const BoardMask osl::state::NumEffectState::changedEffects ( Player  pl  )  const [inline]
const NumBitmapEffect osl::state::NumEffectState::changedPieces (  )  const [inline]
int osl::state::NumEffectState::countEffect ( Player  player,
Position  target,
PieceMask  pins 
) const [inline]

利きの数を数える.

targetが盤をはみ出してはいけない

引数:
pins この駒の利きは数えない

numEffectState.h444 行で定義されています。

参照先 getEffect(), と osl::Position::isOnBoard().

int osl::state::NumEffectState::countEffect ( Player  player,
Position  target 
) const [inline]

利きの数を数える.

targetが盤をはみ出してはいけない

numEffectState.h434 行で定義されています。

参照先 getEffect(), と osl::Position::isOnBoard().

参照元 osl::eval::ml::King25Effect::countEffectAndPieces(), と osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth().

void osl::state::NumEffectState::doCaptureMove ( Position  from,
Position  to,
Piece  target,
int  promoteMask 
)
void osl::state::NumEffectState::doDropMove ( Position  to,
Ptype  ptype 
)

osl::state::SimpleStateを再定義しています。

numEffectState.cc227 行で定義されています。

参照先 osl::BLACK, osl::state::SimpleState::getTurn(), osl::PAWN, と osl::state::SimpleState::setPawn().

void osl::state::NumEffectState::doSimpleMove ( Position  from,
Position  to,
int  promoteMask 
)
const osl::mask_t osl::state::NumEffectState::effectBit ( Player  P,
Ptype  ptype,
Position  target 
) const
template<Ptype PTYPE>
const mask_t osl::state::NumEffectState::effectBit ( Player  P,
Position  target 
) const [inline]

numEffectState.h161 行で定義されています。

参照先 getEffect(), と getOnBoardMask().

const PieceMask osl::state::NumEffectState::effectedChanged ( Player  pl  )  const [inline]

前の指手でeffectedMask(pl)が変化したか.

取られた駒は現在の実装ではリストされないようだ.

numEffectState.h754 行で定義されています。

参照先 osl::effect::NumSimpleEffectTable::effected_changed_mask, と effects.

参照元 isConsistent().

const PieceMask osl::state::NumEffectState::effectedMask ( Player  pl  )  const [inline]

pl からの利きが(1つ以上)ある駒一覧

numEffectState.h747 行で定義されています。

参照先 osl::effect::NumSimpleEffectTable::effected_mask, と effects.

参照元 osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), findThreatenedPiece(), と isConsistent().

template<Ptype PTYPE>
const Piece osl::state::NumEffectState::effectPtype ( Player  attack,
Position  target 
) const [inline]

return a piece s.t.

owner == attack, ptype == PTYPE, has effect on target. return Piece::EMPTY() otherwise

numEffectState.h410 行で定義されています。

参照先 osl::Piece::EMPTY(), と osl::state::SimpleState::getPieceOf().

template<Ptype PTYPE>
const Piece osl::state::NumEffectState::effectPtypeStrict ( Player  attack,
Position  target 
) const [inline]
const Piece osl::state::NumEffectState::findCheapThreat ( Player  P,
Position  square 
) const [inline]
引数:
P - 利きをつけている側のプレイヤ
square - 調査する場所
戻り値:
利きを付けている中で安そうな駒 (複数の場合でもEMPTYにはしない)

numEffectState.h602 行で定義されています。

参照先 getEffect(), getOnBoardMask(), と selectCheapPiece().

const Piece osl::state::NumEffectState::findCheapThreatNotBy ( Player  P,
Position  square,
const PieceMask &  ignore 
) const [inline]
引数:
P - 利きをつけている側のプレイヤ
square - 調査する場所
戻り値:
利きを付けている中で安そうな駒 (複数の場合でもEMPTYにはしない)

numEffectState.h611 行で定義されています。

参照先 getEffect(), getOnBoardMask(), osl::state::SimpleState::pieces, と selectCheapPiece().

template<Player P>
bool osl::state::NumEffectState::findCheckPiece ( Piece attack_piece  )  const [inline]

王手駒を探す

戻り値:
王手かどうか
引数:
attack_piece 一つの駒による王手の場合はattck_pieceにその駒を入れる 複数の駒による王手の場合はPieceEMPTY()を入れる
P(template) 

numEffectState.h651 行で定義されています。

参照先 osl::state::SimpleState::getKingPosition().

const osl::Piece osl::state::NumEffectState::findThreatenedPiece ( Player  P  )  const
const Piece osl::state::NumEffectState::findThreatNotBy ( Player  P,
Position  square,
const PieceMask &  ignore 
) const [inline]
template<Player P, class Action >
void osl::state::NumEffectState::forEachEffect ( Position  pos,
Action &  action,
const PieceMask &  pin 
) const [inline]

pos にある駒を取る move を生成して action の member を呼び出す.

引数:
pin 無視する駒
action たとえば AlwaysMoveAction

numEffectState.h509 行で定義されています。

参照先 getEffect(), と getOnBoardMask().

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

pos への利きを持つ各駒に関して処理を行う.

引数:
action たとえば AlwaysMoveAction

numEffectState.h498 行で定義されています。

参照先 getEffect(), と getOnBoardMask().

template<Player P, class Action >
void osl::state::NumEffectState::forEachEffect ( const PieceMask &  pieces,
Position  pos,
Action &  action 
) const [inline, private]

numEffectState.h468 行で定義されています。

参照先 osl::state::SimpleState::getPieceOf().

template<Player P, class Action >
void osl::state::NumEffectState::forEachEffectNotBy ( Position  pos,
Piece  piece,
Action &  action 
) const [inline]

pos に移動する move を生成して action の member を呼び出す

引数:
action たとえば AlwayMoveAction
piece これ以外の駒を使う

numEffectState.h522 行で定義されています。

参照先 getEffect(), getOnBoardMask(), osl::Piece::number(), と osl::state::SimpleState::pieces.

template<osl::Player P, osl::Ptype Type, class Action >
void osl::state::NumEffectState::forEachEffectOfPiece ( Position  piecePosition,
Action &  action 
) const [inline]

numEffectState.h1094 行で定義されています。

template<class Action >
void osl::state::NumEffectState::forEachEffectOfPiece ( Piece  piece,
Action &  action 
) const [inline]
template<class Action >
void osl::state::NumEffectState::forEachEffectOfPiece ( Piece  piece,
Action &  action 
) const [inline]
template<Player P, Ptype Type, class Action >
void osl::state::NumEffectState::forEachEffectOfPiece ( Position  piecePosition,
Action &  action 
) const [inline]

piecePositionにある駒によって利きを受けるすべてのposition (空白含む)について actionを実行する

SimpleState より移植: ImmediateAddSupportがなければ消せる

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::state::NumEffectState::forEachEffectOfPieceDir ( Position  piecePosition,
Action &  action 
) const [inline, private]

numEffectState.h679 行で定義されています。

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::state::NumEffectState::forEachEffectOfPieceDir ( Position  piecePosition,
Action &  action,
Int2Type< true >   
) const [inline, private]

numEffectState.h673 行で定義されています。

参照先 osl::state::SimpleState::getPieceAt().

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::state::NumEffectState::forEachEffectOfPieceDir ( Position  ,
Action &  ,
Int2Type< false >   
) const [inline, private]

numEffectState.h671 行で定義されています。

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::state::NumEffectState::forEachEffectOfPieceLongDir ( Position  piecePosition,
Action &  action 
) const [inline, private]

numEffectState.h696 行で定義されています。

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::state::NumEffectState::forEachEffectOfPieceLongDir ( Position  piecePosition,
Action &  action,
Int2Type< true >   
) const [inline, private]
template<Player P, Ptype Type, class Action , Direction Dir>
void osl::state::NumEffectState::forEachEffectOfPieceLongDir ( Position  ,
Action &  ,
Int2Type< false >   
) const [inline, private]

numEffectState.h683 行で定義されています。

template<Player P, Ptype Type, class Action >
void osl::state::NumEffectState::forEachEffectPtype ( Position  pos,
Action &  action 
) const [inline]
引数:
P 攻撃側
Type 攻撃駒

numEffectState.h457 行で定義されています。

参照先 osl::state::SimpleState::getPieceOf().

template<Player P, Ptype T, typename F >
void osl::state::NumEffectState::forEachOnBoard ( F &  func  )  const [inline]

T は isBasic でなくても動くが unpromote(T) の結果と同じ.

numEffectState.h71 行で定義されています。

参照先 getOnBoardMask(), と osl::state::SimpleState::getPieceOf().

template<Player P, Ptype T, typename F >
void osl::state::NumEffectState::forEachOnBoardPtypeStrict ( F &  func  )  const [inline]

T の成不成を区別.

numEffectState.h83 行で定義されています。

参照先 getOnBoardMask(), osl::state::SimpleState::getPieceOf(), osl::isPromoted(), と promoted.

NumBitmapEffect osl::state::NumEffectState::getEffect ( Position  pos  )  const [inline]
Position osl::state::NumEffectState::getMobility ( Direction  d,
int  num 
) const [inline]
const PieceMask& osl::state::NumEffectState::getOnBoardMask ( Player  p  )  const [inline]
template<Player P>
bool osl::state::NumEffectState::hasEffectBy ( Position  target,
Piece attackerPiece 
) const [inline]
引数:
P(template) - 利きをつけている側のプレイヤ
target - 利きをつけられた場所
attackerPiece - multiple attackの場合はPieceEMPTY() そうでないなら利きをつけている駒を返す

numEffectState.h555 行で定義されています。

参照先 osl::Piece::EMPTY(), getEffect(), getOnBoardMask(), と osl::state::SimpleState::getPieceOf().

bool osl::state::NumEffectState::hasEffectBy ( Player  P,
Position  target,
Piece attackerPiece 
) const [inline]

numEffectState.h541 行で定義されています。

参照先 osl::BLACK.

template<Player P>
bool osl::state::NumEffectState::hasEffectBy ( Position  target  )  const [inline]

対象とするマスにあるプレイヤーの利きがあるかどうか.

引数:
player 攻撃側
target 対象のマス

numEffectState.h534 行で定義されています。

参照先 getEffect(), と osl::Position::isOnBoard().

bool osl::state::NumEffectState::hasEffectBy ( Player  player,
Position  target 
) const [inline]

対象とするマスにあるプレイヤーの利きがあるかどうか.

引数:
player 攻撃側
target 対象のマス

numEffectState.h323 行で定義されています。

参照先 getEffect(), と osl::Position::isOnBoard().

参照元 osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), hasEffectByWithRemove(), inCheck(), main(), と NumEffectState().

template<Player P>
bool osl::state::NumEffectState::hasEffectByNotPinned ( Position  target  )  const [inline]

pinされている駒以外からの利きがない

numEffectState.h333 行で定義されています。

参照先 osl::alt(), getEffect(), getOnBoardMask(), osl::Position::isOnBoard(), と pinOrOpen().

bool osl::state::NumEffectState::hasEffectByPiece ( Piece  attack,
Position  target 
) const [inline]

駒attack が target に利きを持つか (旧hasEffectToと統合)

引数:
target 対象のマス

numEffectState.h380 行で定義されています。

参照先 getEffect(), osl::Position::isOnBoard(), osl::Piece::isPiece(), と osl::Piece::number().

参照元 isAlmostValidMove().

template<Ptype PTYPE>
bool osl::state::NumEffectState::hasEffectByPtype ( Player  attack,
Position  target 
) const [inline]

target に ptype の利きがあるか? 成不成を区別しない

numEffectState.h391 行で定義されています。

template<Ptype PTYPE>
bool osl::state::NumEffectState::hasEffectByPtypeStrict ( Player  attack,
Position  target 
) const [inline]

target に ptype の利きがあるか? 成不成を区別

numEffectState.h399 行で定義されています。

参照先 osl::isPromoted(), と promoted.

template<osl::Player P>
bool osl::state::NumEffectState::hasEffectByWithRemove ( Position  target,
Position  removed 
) const [inline]
bool osl::state::NumEffectState::hasEffectByWithRemove ( Player  player,
Position  target,
Position  removed 
) const [inline]

numEffectState.h737 行で定義されています。

参照先 osl::BLACK.

template<Player P>
bool osl::state::NumEffectState::hasEffectByWithRemove ( Position  target,
Position  removed 
) const [inline]
template<Direction Dir, Player P>
bool osl::state::NumEffectState::hasEffectDir ( Position  to  )  const [inline]

あるマスにあるDirectionでの長い利きがあるかどうか.

64bit版対応済み

numEffectState.h278 行で定義されています。

参照先 osl::BLACK, osl::Board_Table, osl::BOOST_STATIC_ASSERT(), getEffect(), osl::BoardTable::getLongDirection(), getOnBoardMask(), osl::state::SimpleState::getPieceOf(), osl::misc::GeneralMask< Integer >::makeDirect(), onBoardMask, と osl::Piece::position().

bool osl::state::NumEffectState::hasEffectFromTo ( PtypeO  ptypeo,
Position  attacker,
Position  target 
) const [inline]

attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.

targetPositionは空白でも良い 盤上の駒を動かす事を検討しているときはに, 自分自身の陰に入って利かないと見なされることがある

numEffectState.h719 行で定義されています。

参照先 osl::Board_Table, osl::PtypeTable::getEffect(), osl::BoardTable::getShortOffset(), osl::EffectContent::hasEffect(), osl::EffectContent::hasUnblockableEffect(), osl::state::SimpleState::isEmptyBetween(), osl::EffectContent::offset(), と osl::Ptype_Table.

参照元 pinnedCanMoveTo().

template<Ptype PTYPE>
bool osl::state::NumEffectState::hasEffectLong ( Player  P,
Position  to 
) const [inline]

あるマスにPTYPEの長い利きがあるかどうか.

numEffectState.h308 行で定義されています。

参照先 osl::BISHOP, osl::BOOST_STATIC_ASSERT(), getEffect(), getOnBoardMask(), osl::LANCE, osl::misc::GeneralMask< Integer >::makeDirect(), onBoardMask, と osl::ROOK.

bool osl::state::NumEffectState::hasEffectNotBy ( Player  player,
Piece  piece,
Position  target 
) const [inline]

対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.

指定した駒の利きがあることが前提.

引数:
player 攻撃側
piece 攻撃側の駒
target 対象のマス

numEffectState.h345 行で定義されています。

参照先 getEffect(), getOnBoardMask(), osl::Piece::number(), onBoardMask, と osl::Piece::owner().

参照元 hasEffectByWithRemove().

bool osl::state::NumEffectState::hasEffectNotMask ( Player  player,
Position  target,
PieceMask const &  notMask 
) const [inline]

対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.

指定した駒の利きがあることが前提.

引数:
player 攻撃側
piece 攻撃側の駒
target 対象のマス

numEffectState.h359 行で定義されています。

参照先 getEffect(), getOnBoardMask(), と onBoardMask.

bool osl::state::NumEffectState::hasMultipleEffectBy ( Player  player,
Position  target 
) const [inline]

二つ以上の駒から利きがある.

そもそも利きがない場合も呼ばれる

引数:
player 攻撃側
target 対象のマス

numEffectState.h369 行で定義されています。

参照先 getEffect().

uint64_t osl::state::NumEffectState::Iking8Info ( Player  king  )  const [inline]

numEffectState.h207 行で定義されています。

参照先 king8infos.

参照元 osl::eval::ml::King8EffectAll::eval(), isConsistent(), と king8Info().

bool osl::state::NumEffectState::inCheck (  )  const [inline]

手番の玉が王手状態

numEffectState.h641 行で定義されています。

参照先 osl::state::SimpleState::getTurn(), と inCheck().

参照元 findThreatenedPiece(), と inCheck().

bool osl::state::NumEffectState::inCheck ( Player  P  )  const [inline]
bool osl::state::NumEffectState::isAlmostValidMove ( Move  move,
bool  showError = true 
) const

合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.

局面に依存する検査でも,玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.

osl::state::SimpleStateを再定義しています。

numEffectState.cc501 行で定義されています。

template<bool show_error>
bool osl::state::NumEffectState::isAlmostValidMove ( Move  move  )  const [inline]

合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.

Pをtemplate引数にできると少しは速くなりそう 局面に依存する検査でも,玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.

引数:
showError(template) - falseを返す時には何か表示する.
move - 手

osl::state::SimpleStateを再定義しています。

numEffectState.cc417 行で定義されています。

参照先 osl::Move::capturePtype(), osl::Move::from(), osl::state::SimpleState::getPieceAt(), osl::state::SimpleState::getTurn(), hasEffectByPiece(), osl::state::SimpleState::hasPieceOnStand(), osl::Piece::isEmpty(), osl::Move::isNormal(), osl::state::SimpleState::isPawnMaskSet(), osl::Position::isPieceStand(), osl::Move::isPromote(), osl::Piece::isPromotedNotKingGold(), osl::Move::isValid(), osl::state::SimpleState::isValidMoveByRule(), osl::Piece::owner(), osl::PAWN, osl::Move::player(), osl::Piece::ptype(), osl::Move::ptype(), osl::Move::to(), osl::state::SimpleState::turn, osl::unpromote(), と osl::Position::x().

bool osl::state::NumEffectState::isConsistent ( const NumEffectState prev,
Move  moved,
bool  show_error = true 
) const
bool osl::state::NumEffectState::isConsistent ( bool  showError = true  )  const
bool osl::state::NumEffectState::isOnBoardNum ( int  num  )  const [inline]

numEffectState.h62 行で定義されています。

参照先 osl::BLACK, getOnBoardMask(), と osl::WHITE.

const osl::checkmate::King8Info osl::state::NumEffectState::king8Info ( Player  king  )  const

numEffectState.cc29 行で定義されています。

参照先 Iking8Info().

Position osl::state::NumEffectState::kingMobilityAbs ( Player  p,
Direction  d 
) const [inline]

numEffectState.h112 行で定義されています。

参照先 king_mobility, と osl::Position::makeDirect().

参照元 kingMobilityOfPlayer().

Position osl::state::NumEffectState::kingMobilityOfPlayer ( Player  p,
Direction  d 
) const [inline]

玉がd方向にどこまで動けるかを返す

引数:
p 注目する玉のプレイヤ
d piece からみた向き

numEffectState.h121 行で定義されています。

参照先 osl::BLACK, osl::inverse(), と kingMobilityAbs().

template<Ptype PTYPE>
bool osl::state::NumEffectState::longEffectChanged (  )  const [inline]

numEffectState.h191 行で定義されています。

参照先 changedPieces().

const EffectedNumTable& osl::state::NumEffectState::longEffectNumTable (  )  const [inline]
const Piece osl::state::NumEffectState::longEffectOfDirection ( Position  square,
Direction  d 
) const [inline]

numEffectState.h156 行で定義されています。

参照先 osl::state::SimpleState::getPieceOnBoard(), と longEffectOfDirection().

const Piece osl::state::NumEffectState::longEffectOfDirection ( Piece  piece,
Direction  d 
) const [inline]

numEffectState.h151 行で定義されています。

参照先 osl::Piece::isPiece(), longEffectOfDirection(), と osl::Piece::owner().

const Piece osl::state::NumEffectState::longEffectOfDirection ( Player  owner,
Piece  piece,
Direction  d 
) const [inline]
const Piece osl::state::NumEffectState::longEffectOfDirection ( Player  owner,
int  piece,
Direction  d 
) const [inline]

pieceのd方向から長い利きがある場合にその駒を返す。

引数:
d piece からみた向き

numEffectState.h135 行で定義されています。

参照先 osl::BLACK, osl::effect::NumSimpleEffectTable::effectedNumTable, effects, osl::Piece::EMPTY(), osl::EMPTY_NUM, osl::state::SimpleState::getPieceOf(), と osl::inverse().

参照元 longEffectOfDirection().

template<osl::Player P>
void osl::state::NumEffectState::makeKing8Info (  )  [inline]

numEffectState.cc35 行で定義されています。

参照先 king8infos.

void osl::state::NumEffectState::makeMovePass (  )  [inline]
void osl::state::NumEffectState::makePinOpen ( osl::Player  defense  ) 

numEffectState.cc555 行で定義されています。

参照先 osl::state::SimpleState::getKingPosition(), makePinOpen(), と pin_or_open.

osl::container::PieceMask osl::state::NumEffectState::makePinOpen ( osl::Position  target,
osl::Player  defense 
) [private]

numEffectState.cc538 行で定義されています。

参照先 osl::alt(), getOnBoardMask(), と osl::Position::isPieceStand().

参照元 makePinOpen(), と NumEffectState().

template<Direction DIR>
void osl::state::NumEffectState::makePinOpenDir ( Position  target,
PieceMask &  pins,
PieceMask const &  onBoard,
Player  defense 
) [inline, private]
PieceMask& osl::state::NumEffectState::mutableOnBoardMask ( Player  p  )  [inline, private]

numEffectState.h55 行で定義されています。

参照先 onBoardMask.

参照元 NumEffectState().

PieceMask osl::state::NumEffectState::pin ( Player  king  )  const [inline]

numEffectState.h199 行で定義されています。

参照先 getOnBoardMask(), と pin_or_open.

参照元 isConsistent().

template<Player P>
bool osl::state::NumEffectState::pinnedCanMoveTo ( Piece  p,
Position  to 
) const [inline]

pinされた駒pがtoに動けるか? pinに関係がなければtoへ動けるという前提

numEffectState.h780 行で定義されています。

参照先 osl::Board_Table, osl::BoardTable::getShort8Unsafe(), hasEffectFromTo(), osl::Piece::position(), osl::primDir(), osl::primDirUnsafe(), と osl::Piece::ptypeO().

template<Player P>
Direction osl::state::NumEffectState::pinnedDir ( Piece  p  )  const [inline]

pinされた駒がPのKingから見てどの方向か? Pから見たdirectionを返す

numEffectState.h769 行で定義されています。

参照先 osl::Board_Table, osl::BoardTable::getShort8(), osl::Piece::number(), pinOrOpen(), と osl::Piece::position().

PieceMask osl::state::NumEffectState::pinOrOpen ( Player  king  )  const [inline]

numEffectState.h203 行で定義されています。

参照先 pin_or_open.

参照元 hasEffectByNotPinned(), と pinnedDir().

const PieceMask osl::state::NumEffectState::promotedPieces (  )  const [inline]

numEffectState.h212 行で定義されています。

参照先 promoted.

参照元 findThreatenedPiece().

void osl::state::NumEffectState::recalcPinOpen ( Position  changed,
Direction lastDir,
Player  defense 
) [inline, private]
const osl::Piece osl::state::NumEffectState::selectCheapPiece ( PieceMask  effect  )  const

利きの中から安そうな駒を選ぶ

numEffectState.cc85 行で定義されています。

参照先 osl::Piece::EMPTY(), osl::state::SimpleState::getPieceOf(), osl::KING, osl::LANCE, osl::eval::min(), osl::PAWN, osl::state::SimpleState::pieces, と promoted.

参照元 findCheapThreat(), と findCheapThreatNotBy().

const mask_t osl::state::NumEffectState::selectLong ( Position  target,
Player  owner 
) const [inline]

numEffectState.h174 行で定義されています。

参照先 getEffect(), getOnBoardMask(), と selectLong().

template<Ptype PTYPE>
const mask_t osl::state::NumEffectState::selectLong ( Position  target,
Player  owner 
) const [inline]

numEffectState.h170 行で定義されています。

参照先 getOnBoardMask().

template<Ptype PTYPE>
const mask_t osl::state::NumEffectState::selectLong ( Position  target  )  const [inline]

numEffectState.h166 行で定義されています。

参照先 getEffect().

参照元 hasEffectByWithRemove(), と selectLong().

void osl::state::NumEffectState::setMobility ( Direction  d,
int  num,
Position  pos 
) [inline]
void osl::state::NumEffectState::showEffect ( std::ostream &  os  )  const

フレンドと関連する関数

friend class apply_move::ApplyDoUndoCaptureMove< BLACK, NumEffectState > [friend]

numEffectState.h49 行で定義されています。

friend class apply_move::ApplyDoUndoCaptureMove< WHITE, NumEffectState > [friend]

numEffectState.h52 行で定義されています。

friend class apply_move::ApplyDoUndoDropMove< BLACK, NumEffectState > [friend]

numEffectState.h50 行で定義されています。

friend class apply_move::ApplyDoUndoDropMove< WHITE, NumEffectState > [friend]

numEffectState.h53 行で定義されています。

friend class apply_move::ApplyDoUndoSimpleMove< BLACK, NumEffectState > [friend]

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

friend class apply_move::ApplyDoUndoSimpleMove< WHITE, NumEffectState > [friend]

numEffectState.h51 行で定義されています。

bool operator== ( const NumEffectState st1,
const NumEffectState st2 
) [friend]

駒番に依存した局面(インスタンス)比較をする.

なお、駒番に非依存な局面比較をしたい場合は、oslrecord::CompactBoardや osl::hash::HashKeyを用いる.

friend class osl::misc::FastCopier [friend]

osl::state::SimpleStateを再定義しています。

numEffectState.h54 行で定義されています。


変数

CArray<uint64_t,2> osl::state::NumEffectState::king8infos [private]

numEffectState.h44 行で定義されています。

参照元 Iking8Info(), と makeKing8Info().

numEffectState.h43 行で定義されています。

参照元 kingMobilityAbs(), makePinOpenDir(), osl::state::operator==(), と recalcPinOpen().

CArray<PieceMask,2> osl::state::NumEffectState::onBoardMask [private]
CArray<PieceMask,2> osl::state::NumEffectState::pin_or_open [private]

numEffectState.h42 行で定義されています。

参照元 makePinOpen(), osl::state::operator==(), pin(), pinOrOpen(), と recalcPinOpen().


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