osl::NumEffectState Class Reference

利きを持つ局面 More...

`#include <numEffectState.h>`

Inheritance diagram for osl::NumEffectState:

## Public Member Functions

| NumEffectState (const SimpleState &st=SimpleState(HIRATE))
| ~NumEffectState ()
void | copyFrom (const NumEffectState &src)
| 主要部分を高速にコピーする.
void | copyFrom (const SimpleState &src)
bool | isConsistent (bool showError=true) const
bool | isConsistent (const NumEffectState &prev, Move moved, bool show_error=true) const
| 局面更新に関する一貫性をテスト
void | showEffect (std::ostream &os) const
const PieceMask & | piecesOnBoard (Player p) const
const PieceMask | promotedPieces () const
const PieceMask | pin (Player king) const
const PieceMask | checkShadow (Player attack) const
| attack の駒で動くと開き王手になる可能性がある集合
PieceMask | pinOrOpen (Player king) const
uint64_t | Iking8Info (Player king) const
const checkmate::King8Info | king8Info (Player king) const
bool | inCheck (Player P) const
| Pの玉が王手状態
bool | inCheck () const
| 手番の玉が王手状態
bool | inUnblockableCheck (Player target) const
| target の王に合駒可能でない王手がかかっているかどうか.
const EffectedNumTable & | longEffectNumTable () const
const PieceMask | effectedMask (Player pl) const
| pl からの利きが(1つ以上)ある駒一覧
const PieceMask | effectedChanged (Player pl) const
| 前の指手でeffectedMask(pl)が変化したか.
bool | hasChangedEffects () 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
const Piece | findThreatenedPiece (Player P) const
| 取られそうなPの駒で価値が最大のもの
bool | isOnBoardNum (int num) const
Square | mobilityOf (Direction d, int num) const
Square | mobilityOf (Direction d, Piece p) const
Square | kingMobilityAbs (Player p, Direction d) const
Square | kingMobilityOfPlayer (Player p, Direction d) const
| 玉がd方向にどこまで動けるかを返す
template<Player P>
Direction | pinnedDir (Piece p) const
| pinされた駒がPのKingから見てどの方向か?
Direction | pinnedDir (Piece p) const
template<Player P>
bool | pinnedCanMoveTo (Piece p, Square to) const
| pinされた駒pがtoに動けるか?
bool | pinnedCanMoveTo (Piece p, Square to) const
template<Player P>
Piece | pinAttacker (Piece pinned) const
| Pのpinされた駒から，そのpinの原因となっている長い利きを持つ駒を得る．
Piece | pinAttacker (Piece pinned) const
const NumBitmapEffect | effectSetAt (Square sq) const
int | countEffect (Player player, Square target) const
| 利きの数を数える.
int | countEffect (Player player, Square target, PieceMask pins) const
| 利きの数を数える.
template<Ptype PTYPE>
const mask_t | allEffectAt (Player P, Square target) const
const mask_t | allEffectAt (Player P, Ptype ptype, Square target) const
template<Ptype PTYPE>
const mask_t | longEffectAt (Square target) const
template<Ptype PTYPE>
const mask_t | longEffectAt (Square target, Player owner) const
const mask_t | longEffectAt (Square target) const
const mask_t | longEffectAt (Square target, Player owner) const
template<Player P>
bool | hasEffectAt (Square target) const
| 対象とするマスにあるプレイヤーの利きがあるかどうか.
bool | hasEffectAt (Player player, Square target) const
| 対象とするマスにあるプレイヤーの利きがあるかどうか.
template<Ptype PTYPE>
bool | hasLongEffectAt (Player P, Square to) const
| あるマスにPTYPEの長い利きがあるかどうか.
template<Ptype PTYPE>
bool | hasEffectByPtype (Player attack, Square target) const
| target に ptype の利きがあるか?
template<Ptype PTYPE>
bool | hasEffectByPtypeStrict (Player attack, Square target) const
| target に ptype の利きがあるか?
template<Direction Dir, Player P>
bool | hasEffectInDirection (Square to) const
| あるマスにあるDirectionでの長い利きがあるかどうか.
bool | hasEffectNotBy (Player player, Piece piece, Square target) const
| 対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.
bool | hasEffectByNotPinnedAndKing (Player pl, Square target) const
| {pinされている駒, 玉以外}からの利きがある.
bool | hasEffectByNotPinned (Player pl, Square target) const
| pinされている駒以外からの利きがある.
bool | hasMultipleEffectAt (Player player, Square target) const
| 二つ以上の駒から利きがある.
bool | hasEffectByPiece (Piece attack, Square target) const
| 駒attack が target に利きを持つか (旧hasEffectToと統合)
bool | hasEffectIf (PtypeO ptypeo, Square attacker, Square target) const
| attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.
template<Player P>
bool | hasEffectByWithRemove (Square target, Square removed) const
bool | hasEffectByWithRemove (Player player, Square target, Square removed) const
template<Ptype PTYPE>
const Piece | findAttackAt (Player attack, Square target) const
| return a piece s.t.
template<Ptype PTYPE>
const Piece | findAttackAtStrict (Player attack, Square target) const
const Piece | findLongAttackAt (Player owner, int piece, Direction d) const
| pieceのd方向から長い利きがある場合にその駒を返す。
const Piece | findLongAttackAt (Player owner, Piece piece, Direction d) const
const Piece | findLongAttackAt (Piece piece, Direction d) const
const Piece | findLongAttackAt (Square square, Direction d) const
const Piece | selectCheapPiece (PieceMask effect) const
| 利きの中から安そうな駒を選ぶ
const Piece | findCheapAttack (Player P, Square square) const
const Piece | findCheapAttackNotBy (Player P, Square square, const PieceMask &ignore) const
const Piece | findAttackNotBy (Player P, Square square, const PieceMask &ignore) const
template<Player P>
bool | findCheckPiece (Piece &attack_piece) const
| 王手駒を探す
bool | hasEffectAt (Player P, Square target, Piece &attackerPiece) const
template<Player P>
bool | hasEffectAt (Square target, Piece &attackerPiece) const
bool | isSafeMove (Move move) const
bool | isCheck (Move move) const
bool | isPawnDropCheckmate (Move move) const
bool | isDirectCheck (Move move) const
bool | isOpenCheck (Move move) const
template<bool show_error>
bool | isAlmostValidMove (Move move) const
| 合法手かどうかを簡単に検査する．局面に依存するチェックのみ． ルール上指せない手である可能性がある場合は，isValidMove を用いる．
bool | isAlmostValidMove (Move move, bool show_error=true) const
void | generateLegal (MoveVector &) const
| 全ての合法手を生成する.
void | generateWithFullUnpromotions (MoveVector &) const
| 打歩詰め絡み以外では有利にはならない手も含め, 全ての合法手を生成す る（Move::ignoredUnpromoteも生成する）.
void | generateAllUnsafe (MoveVector &) const
| 自殺を含めてすべての手を生成
void | makeMove (Move move)
void | makeMovePass ()
template<class Function>
void | makeUnmakePass (Function &f)
template<class Function>
void | makeUnmakeMove (Move move, Function &f)
template<Player P, class Function>
void | makeUnmakeMove (Player2Type< P > player, Move move, Function &f)
bool | wasCheckEvasion (Move last_move) 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 の成不成を区別
template<Player P, class Action>
void | forEachEffect (Square sq, Action &action) const
| sq への利きを持つ各駒に関して処理を行う.
template<Player P, class Action>
void | forEachEffect (Square sq, Action &action, const PieceMask &pin) const
| sq にある駒を取る move を生成して action の member を呼び出す.
template<Player P, class Action>
void | forEachEffectNotBy (Square sq, Piece piece, Action &action) const
| sq に移動する move を生成して action の member を呼び出す
template<Player P, Ptype Type, class Action>
void | forEachEffectOfPiece (Square pieceSquare, Action &action) const
| pieceSquareにある駒によって利きを受けるすべてのsquare (空白含む)について actionを実行する
template<class Action>
void | forEachEffectOfPiece (Piece piece, Action &action) const
template<class Function, bool InterestEmpty>
void | forEachEffectOfPtypeO (Square, PtypeO, Function &f) const
| PtypeO が Square にいると仮定した時にの利きを列挙.
template<Player P, class Function, bool InterestEmpty>
void | forEachEffectOfPtypeO (Square, Ptype, Function &f) const
template<Player P>
Piece | safeCaptureNotByKing (Square target, Piece king) const
| 玉の素抜きなしに合法手でtargetに移動可能かを判定
Piece | safeCaptureNotByKing (Player P, Square target) const
template<class Action>
void | forEachEffect (Player P, Square pos, Action &a) const
| forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン
void | findEffect (Player P, Square target, PieceVector &out) const
| target に利きのあるPieceをoutに格納する
Public Member Functions inherited from osl::SimpleState
| SimpleState ()
| SimpleState (Handicap h)
virtual | ~SimpleState ()
void | init ()
| 盤面が空の状態に初期化
void | init (Handicap h)
| ハンディに応じた初期状態に初期化
void | initPawnMask ()
const Piece | pieceOf (int num) const
void | setPieceOf (int num, Piece p)
template<Player P>
const Piece | kingPiece () const
const Piece | kingPiece (Player P) const
template<Player P>
Square | kingSquare () const
Square | kingSquare (Player player) const
template<Ptype PTYPE>
const Piece | nth (int n) const
| unpromote(PTYPE)のn番目の駒を帰す.
void | setBoard (Square sq, Piece piece)
const PieceMask & | standMask (Player p) const
const PieceMask & | usedMask () const
bool | isOffBoard (int num) const
void | clearPawn (Player pl, Square sq)
| (internal)
void | setPawn (Player pl, Square sq)
| (internal)
bool | isPawnMaskSet (Player player, int x) const
template<Player P>
bool | isPawnMaskSet (int x) const
bool | canDropPawnTo (Player player, int x) const
| xの筋に歩を打てる
void | setPiece (Player player, Square sq, Ptype ptype)
void | setPieceAll (Player player)
const Piece | pieceAt (Square sq) const
const Piece | operator[] (Square sq) const
const Piece * | getPiecePtr (Square sq) const
const Piece | pieceOnBoard (Square sq) const
bool | isOnBoard (int num) const
int | countPiecesOnStand (Player pl, Ptype ptype) const
| 持駒の枚数を数える
template<Ptype Type>
int | countPiecesOnStand (Player pl) const
| 後方互換
bool | hasPieceOnStand (Player player, Ptype ptype) const
template<Ptype T>
bool | hasPieceOnStand (Player P) const
Piece | nextPiece (Square cur, Offset diff) const
| diff方向にあるPiece を求める.
void | setTurn (Player player)
Player | turn () const
void | changeTurn ()
| 手番を変更する
bool | isConsistent (bool show_error=true) const
template<bool show_error>
bool | isAlmostValidMove (Move move) const
| エラー表示をするかどうかをtemplateパラメータにした高速化版
bool | isAlmostValidMove (Move move, bool show_error=true) const
| 合法手かどうかを簡単に検査する．局面に依存するチェックのみ． ルール上指せない手である可能性がある場合は，isValidMove を用いる．
bool | isValidMove (Move move, bool show_error=true) const
| 合法手かどうかを検査する． isValidMoveByRule, isAlmostValidMove をおこなう． 玉の素抜きや王手を防いでいるか， 千日手，打歩詰かどうかは検査しない．
bool | isEmptyBetween (Square from, Square to, Offset offset, bool pieceExistsAtTo=false) const
bool | isEmptyBetween (Square from, Square to, bool noSpaceAtTo=false) const
bool | dump () const
| dump: 自分を cerr に表示する。abort 前などにデバッグに使う
const SimpleState | emulateCapture (Piece from, Player new_owner) const
| from で表現されたPieceをnew_ownerの持駒にした局面を作る.
const SimpleState | emulateHandPiece (Player from, Player to, Ptype ptype) const
| from からto に ptypeの持駒を一枚渡した局面を作る.
const SimpleState | rotate180 () const
const SimpleState | flipHorizontal () const

## Private Types

typedef NumEffectState | state_t

## Private Member Functions

template<Player P, class Action>
void | forEachEffect (const PieceMask &pieces, Square sq, Action &action) const
template<Player P, Ptype Type, class Action, Direction Dir>
void | forEachEffectOfPieceDir (Square, Action &, Int2Type< false >) const
template<Player P, Ptype Type, class Action, Direction Dir>
void | forEachEffectOfPieceDir (Square pieceSquare, Action &action, Int2Type< true >) const
template<Player P, Ptype Type, class Action, Direction Dir>
void | forEachEffectOfPieceDir (Square pieceSquare, Action &action) const
template<Player P, Ptype Type, class Action, Direction Dir>
void | forEachEffectOfPieceLongDir (Square, Action &, Int2Type< false >) const
template<Player P, Ptype Type, class Action, Direction Dir>
void | forEachEffectOfPieceLongDir (Square pieceSquare, Action &action, Int2Type< true >) const
template<Player P, Ptype Type, class Action, Direction Dir>
void | forEachEffectOfPieceLongDir (Square pieceSquare, Action &action) const
void | doSimpleMove (Square from, Square to, int promoteMask)
void | doDropMove (Square to, Ptype ptype)
void | doCaptureMove (Square from, Square to, Piece target, int promoteMask)
template<Player P, class Function>
void | doUndoSimpleMove (Player2Type< P > player, Square from, Square to, int promoteMask, Function &func)
template<Player P>

void

prologueSimple (Player2Type< P >, Square from, Square to, int promoteMask, Piece &oldPiece, int &num, PtypeO &oldPtypeO, PtypeO &new_ptypeo, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, PieceMask &promoted_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)

void

epilogueSimple (Square from, Square to, Piece oldPiece, int num, PtypeO oldPtypeO, PtypeO newPtypeO, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const PieceMask &promoted_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)

template<Player P, class Function>
void | doUndoDropMove (Player2Type< P > player, Square to, Ptype ptype, Function &func)
template<Player P>
void | prologueDrop (Player2Type< P >, Square to, Ptype ptype, Piece &oldPiece, int &num, PtypeO &ptypeO, int &numIndex, mask_t &numMask, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
template<Player P>

void

epilogueDrop (Player2Type< P >, Square to, Ptype ptype, Piece oldPiece, int num, PtypeO ptypeO, int numIndex, mask_t numMask, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)

template<Player P, class Function>
void | doUndoCaptureMove (Player2Type< P > player, Square from, Square to, Piece target, int promoteMask, Function &func)
template<Player P>

void

prologueCapture (Player2Type< P >, Square from, Square to, Piece target, int promoteMask, Piece &oldPiece, PtypeO &oldPtypeO, PtypeO &capturePtypeO, PtypeO &new_ptypeo, int &num0, int &num1, int &num1Index, mask_t &num1Mask, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, PieceMask &promoted_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)

template<Player P>

void

epilogueCapture (Player2Type< P >, Square from, Square to, Piece target, Piece oldPiece, PtypeO oldPtypeO, PtypeO capturePtypeO, PtypeO newPtypeO, int num0, int num1, int num1Index, mask_t num1Mask, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const PieceMask &promoted_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)

template<Direction DIR>
void | makePinOpenDir (Square target, PieceMask &pins, PieceMask const &onBoard, Player defense)
void | recalcPinOpen (Square changed, Direction &lastDir, Player defense)
PieceMask | makePinOpen (Square target, Player defense)
void | makePinOpen (Player defense)
template<Player P>
void | makeKing8Info ()

## Private Attributes

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

## Friends

bool | operator== (const NumEffectState &st1, const NumEffectState &st2)
| 駒番に依存した局面（インスタンス）比較をする.

## Additional Inherited Members

Static Public Member Functions inherited from osl::SimpleState
template<Ptype PTYPE>
static int | nthLimit ()
static bool | isValidMoveByRule (Move move, bool show_error)
| 盤面以外の部分の反則のチェック
Static Public Attributes inherited from osl::SimpleState
static const bool | hasPawnMask =true
Protected Member Functions inherited from osl::SimpleState
PieceMask & | standMask (Player p)
template<bool show_error>
bool | isAlmostValidDrop (Move move) const
template<bool show_error>
bool | testValidityOtherThanEffect (Move move) const
Protected Attributes inherited from osl::SimpleState
CArray< Piece, Square::SIZE > | board
CArray< Piece, Piece::SIZE > | pieces
| 全てのpieceが登録されている
CArray< PieceMask, 2 > | stand_mask
CArray< BitXmask, 2 > | pawnMask
CArray< CArray< char, PTYPE_SIZE-PTYPE_BASIC_MIN >, 2 > | stand_count
Player | player_to_move
| 手番
PieceMask | used_mask

## Detailed Description

利きを持つ局面

- effects (NumSimpleEffectTable) 利き
- pieces_onboard (PieceMask) 盤上にある駒

Definition at line 30 of file numEffectState.h.

## Member Typedef Documentation

## state_t

typedef NumEffectState osl::NumEffectState::state_t

private

Definition at line 44 of file numEffectState.h.

## Constructor & Destructor Documentation

## NumEffectState()

osl::NumEffectState::NumEffectState | ( | const SimpleState & | st = SimpleState(HIRATE) | ) |

explicit

Definition at line 60 of file numEffectState.cc.

References osl::BLACK, effects, hasEffectAt(), osl::indexToPlayer(), osl::Piece::isOnBoard(), osl::SimpleState::isOnBoard(), osl::Piece::isPromoted(), osl::SimpleState::kingSquare(), makeKing8Info(), makePinOpen(), osl::Piece::owner(), osl::SimpleState::pieceOf(), pieces_onboard, promoted, osl::SimpleState::SimpleState(), osl::Piece::square(), and osl::WHITE.

Referenced by copyFrom(), copyFrom(), isConsistent(), and operator==.

## ~NumEffectState()

osl::NumEffectState::~NumEffectState | ( |  | ) |

Definition at line 94 of file numEffectState.cc.

## Member Function Documentation

## allEffectAt() [1/2]

const osl::mask_t osl::NumEffectState::allEffectAt | ( | Player | P,
|  | Ptype | ptype,
|  | Square | target ) const

Definition at line 906 of file numEffectState.cc.

References allEffectAt(), osl::BISHOP, osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, osl::PPAWN, osl::PROOK, osl::PSILVER, osl::ROOK, and osl::SILVER.

## allEffectAt() [2/2]

template<Ptype PTYPE>

const mask_t osl::NumEffectState::allEffectAt | ( | Player | P,
|  | Square | target ) const

inline

Definition at line 293 of file numEffectState.h.

References effectSetAt(), and piecesOnBoard().

Referenced by allEffectAt(), osl::checkmate::OracleAdjust::attack(), findAttackAt(), findAttackAtStrict(), hasEffectByPtype(), hasEffectByPtypeStrict(), and osl::ki2::show().

## anyEffectChanged()

template<Ptype PTYPE>

bool osl::NumEffectState::anyEffectChanged | ( |  | ) | const

inline

Definition at line 159 of file numEffectState.h.

References changedPieces().

Referenced by osl::eval::ml::OpenMidEndingEval::updateSub().

## changedEffects() [1/2]

const BoardMask osl::NumEffectState::changedEffects | ( |  | ) | const

inline

Definition at line 148 of file numEffectState.h.

References osl::BLACK, changedEffects(), and osl::WHITE.

Referenced by changedEffects().

## changedEffects() [2/2]

const BoardMask osl::NumEffectState::changedEffects | ( | Player | pl | ) | const

inline

Definition at line 144 of file numEffectState.h.

References effects, and hasChangedEffects().

Referenced by osl::eval::ml::King25EffectEachBoth::evalWithUpdate(), osl::eval::ml::King25EmptySquareNoEffect::evalWithUpdate(), osl::eval::ml::KingXBlockedYBase::evalWithUpdateBang(), osl::eval::ml::King8EffectBase::evalWithUpdateCommon(), osl::eval::ml::King8EffectBase::evalWithUpdateCommon(), isConsistent(), prologueCapture(), prologueDrop(), prologueSimple(), osl::progress::Effect5x3::update(), osl::progress::Effect5x3d::update(), osl::progress::Effect5x3WithBonus::update(), osl::progress::ml::NewProgress::updateMain(), osl::eval::ml::OpenMidEndingEval::updateSub(), and osl::progress::ml::NewProgress::updateSub().

## changedPieces()

const NumBitmapEffect osl::NumEffectState::changedPieces | ( |  | ) | const

inline

Definition at line 152 of file numEffectState.h.

References effects.

Referenced by anyEffectChanged(), isConsistent(), and longEffectChanged().

## checkShadow()

const PieceMask osl::NumEffectState::checkShadow | ( | Player | attack | ) | const

inline

attack の駒で動くと開き王手になる可能性がある集合

Definition at line 70 of file numEffectState.h.

References osl::alt(), piecesOnBoard(), and pin_or_open.

Referenced by osl::eval::ml::CheckShadowPtype::evalOne().

## copyFrom() [1/2]

void osl::NumEffectState::copyFrom | ( | const NumEffectState & | src | ) |

主要部分を高速にコピーする.

盤の外はコピーされない

Definition at line 932 of file numEffectState.cc.

References osl::SimpleState::board, effects, osl::Square::index(), king8infos, king_mobility, NumEffectState(), osl::SimpleState::pawnMask, osl::SimpleState::pieces, pieces_onboard, pin_or_open, osl::SimpleState::player_to_move, promoted, osl::SimpleState::stand_count, osl::SimpleState::stand_mask, and osl::SimpleState::used_mask.

Referenced by copyFrom(), and osl::usi::parse().

## copyFrom() [2/2]

void osl::NumEffectState::copyFrom | ( | const SimpleState & | src | ) |

Definition at line 1048 of file numEffectState.cc.

References copyFrom(), NumEffectState(), and osl::SimpleState::SimpleState().

## countEffect() [1/2]

int osl::NumEffectState::countEffect | ( | Player | player,
|  | Square | target ) const

inline

利きの数を数える.

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

Definition at line 266 of file numEffectState.h.

References osl::effect::NumBitmapEffect::countEffect(), effectSetAt(), and osl::Square::isOnBoard().

Referenced by osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::King5x5Ptype::addOne(), osl::move_probability::MoveInfo::adhocAdjustAttackCheckmateDefender(), osl::progress::Effect5x3WithBonus::attackEffect3(), osl::checkmate::attackProofCost(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::move_probability::Feature::classifyEffect9(), osl::rating::CountEffect2::count(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::checkmate::ProofNumberTable::countLiberty(), osl::move_probability::CoverFork::defending(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King25EffectEach< 2 >::effectState(), osl::eval::ml::King8Effect::effectState(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::Promotion37::evalOne(), osl::effect_util::SendOffSquare::find(), osl::move_probability::BlockLong::findAll(), osl::eval::See::findEffectPieces(), osl::eval::See::findEffectPiecesAfterMove(), osl::rating::PinAttack::index(), osl::progress::Effect5x3d::makeProgress(), osl::progress::Effect5x3::makeProgressArea(), osl::move_probability::AttackFromOpposingSliders::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::LongRecapture::match(), osl::rating::PinAttack::match(), osl::checkmate::King8Info::moveCandidateDir(), osl::effect_util::SendOffSquare::onlyOneSupport(), osl::eval::ml::King8EffectBase::MakeEffectStateDefense::operator()(), osl::eval::ml::King8EffectBase::MakeEffectStateSimple::operator()(), osl::progress::ml::NewProgress::progressOne(), and osl::progress::ml::NewProgress::promotion37One().

## countEffect() [2/2]

int osl::NumEffectState::countEffect | ( | Player | player,
|  | Square | target,
|  | PieceMask | pins ) const

inline

利きの数を数える.

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

Parameters

  pins | この駒の利きは数えない

Definition at line 280 of file numEffectState.h.

References osl::container::PieceMask64::countBit(), effectSetAt(), and osl::Square::isOnBoard().

## doCaptureMove()

void osl::NumEffectState::doCaptureMove | ( | Square | from,
|  | Square | to,
|  | Piece | target,
|  | int | promoteMask )

private

Definition at line 259 of file numEffectState.cc.

References osl::alt(), osl::BLACK, osl::SimpleState::clearPawn(), osl::newPtypeO(), osl::PAWN, prologueCapture(), osl::Piece::ptype(), and osl::SimpleState::turn().

Referenced by makeMove().

## doDropMove()

void osl::NumEffectState::doDropMove | ( | Square | to,
|  | Ptype | ptype )

private

Definition at line 292 of file numEffectState.cc.

References osl::BLACK, osl::PAWN, prologueDrop(), osl::SimpleState::setPawn(), and osl::SimpleState::turn().

Referenced by makeMove().

## doSimpleMove()

void osl::NumEffectState::doSimpleMove | ( | Square | from,
|  | Square | to,
|  | int | promoteMask )

private

Definition at line 231 of file numEffectState.cc.

References osl::BLACK, osl::SimpleState::clearPawn(), osl::newPtypeO(), prologueSimple(), and osl::SimpleState::turn().

Referenced by makeMove().

## doUndoCaptureMove()

template<osl::Player P, typename Function>

void osl::NumEffectState::doUndoCaptureMove | ( | Player2Type< P > | player,
|  | Square | from,
|  | Square | to,
|  | Piece | target,
|  | int | promoteMask,
|  | Function & | func )

private

Definition at line 1125 of file numEffectState.h.

References osl::alt(), osl::SimpleState::changeTurn(), osl::SimpleState::clearPawn(), epilogueCapture(), osl::newPtypeO(), osl::PAWN, prologueCapture(), osl::Piece::ptype(), and osl::SimpleState::setPawn().

Referenced by makeUnmakeMove().

## doUndoDropMove()

template<osl::Player P, typename Function>

void osl::NumEffectState::doUndoDropMove | ( | Player2Type< P > | player,
|  | Square | to,
|  | Ptype | ptype,
|  | Function & | func )

private

Definition at line 1085 of file numEffectState.h.

References osl::SimpleState::changeTurn(), osl::SimpleState::clearPawn(), epilogueDrop(), osl::PAWN, prologueDrop(), and osl::SimpleState::setPawn().

Referenced by makeUnmakeMove().

## doUndoSimpleMove()

template<osl::Player P, typename Function>

void osl::NumEffectState::doUndoSimpleMove | ( | Player2Type< P > | player,
|  | Square | from,
|  | Square | to,
|  | int | promoteMask,
|  | Function & | func )

private

Definition at line 1041 of file numEffectState.h.

References osl::SimpleState::changeTurn(), osl::SimpleState::clearPawn(), epilogueSimple(), osl::newPtypeO(), prologueSimple(), and osl::SimpleState::setPawn().

Referenced by makeUnmakeMove().

## effectedChanged()

const PieceMask osl::NumEffectState::effectedChanged | ( | Player | pl | ) | const

inline

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

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

Definition at line 137 of file numEffectState.h.

References effects.

Referenced by isConsistent(), and osl::eval::ml::NonPawnAttackedPtype::updateChanged().

## effectedMask()

const PieceMask osl::NumEffectState::effectedMask | ( | Player | pl | ) | const

inline

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

Definition at line 130 of file numEffectState.h.

References effects.

Referenced by osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::KnightFork::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), findThreatenedPiece(), osl::rating::ImmediateAddSupport::index(), isConsistent(), osl::move_probability::CoverFork::match(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), osl::progress::ml::NewProgress::updatePawnFacing(), and osl::eval::ml::OpenMidEndingEval::updateSub().

## effectSetAt()

const NumBitmapEffect osl::NumEffectState::effectSetAt | ( | Square | sq | ) | const

inline

Definition at line 258 of file numEffectState.h.

References effects.

Referenced by allEffectAt(), countEffect(), countEffect(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King25EffectEachBoth::effectStateIndex3(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::move_probability::ToEffect::find(), findAttackNotBy(), findCheapAttack(), findCheapAttackNotBy(), forEachEffect(), forEachEffect(), forEachEffectNotBy(), osl::effect_util::AdditionalEffect::hasEffect(), hasEffectAt(), hasEffectAt(), hasEffectAt(), hasEffectByNotPinned(), hasEffectByNotPinnedAndKing(), hasEffectByPiece(), hasEffectInDirection(), hasEffectNotBy(), hasMultipleEffectAt(), isConsistent(), longEffectAt(), osl::progress::Effect5x3WithBonus::makeEffectMask(), osl::move_probability::ToEffectLong::match(), prologueCapture(), showEffect(), osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState(), and osl::eval::ml::NonPawnAttackedPtype::updateChanged().

## epilogueCapture()

template<osl::Player P>

template void osl::NumEffectState::epilogueCapture | ( | Player2Type< P > | ,
|  | Square | from,
|  | Square | to,
|  | Piece | target,
|  | Piece | oldPiece,
|  | PtypeO | oldPtypeO,
|  | PtypeO | capturePtypeO,
|  | PtypeO | newPtypeO,
|  | int | num0,
|  | int | num1,
|  | int | num1Index,
|  | mask_t | num1Mask,
|  | const CArray< PieceMask, 2 > & | pin_or_open_backup,
|  | const KingMobility & | king_mobility_backup,
|  | const PieceMask & | promoted_backup,
|  | const CArray< PieceMask, 2 > & | effected_mask_backup,
|  | const CArray< PieceMask, 2 > & | effected_changed_mask_backup,
|  | const CArray< uint64_t, 2 > & | king8infos_backup,
|  | const MobilityTable & | mobility_backup )

private

Definition at line 625 of file numEffectState.cc.

References osl::alt(), effects, osl::getPtype(), king8infos, king_mobility, osl::newPtypeO(), pieces_onboard, pin_or_open, promoted, osl::PTYPE_BASIC_MIN, osl::SimpleState::setBoard(), osl::SimpleState::setPieceOf(), osl::SimpleState::stand_count, osl::SimpleState::standMask(), and osl::unpromote().

Referenced by doUndoCaptureMove().

## epilogueDrop()

template<osl::Player P>

template void osl::NumEffectState::epilogueDrop | ( | Player2Type< P > | ,
|  | Square | to,
|  | Ptype | ptype,
|  | Piece | oldPiece,
|  | int | num,
|  | PtypeO | ptypeO,
|  | int | numIndex,
|  | mask_t | numMask,
|  | const CArray< PieceMask, 2 > & | pin_or_open_backup,
|  | const KingMobility & | king_mobility_backup,
|  | const CArray< PieceMask, 2 > & | effected_mask_backup,
|  | const CArray< PieceMask, 2 > & | effected_changed_mask_backup,
|  | const CArray< uint64_t, 2 > & | king8infos_backup,
|  | const MobilityTable & | mobility_backup )

private

Definition at line 502 of file numEffectState.cc.

References effects, osl::Piece::EMPTY(), king8infos, king_mobility, pieces_onboard, pin_or_open, osl::PTYPE_BASIC_MIN, osl::SimpleState::setBoard(), osl::SimpleState::setPieceOf(), osl::SimpleState::stand_count, and osl::SimpleState::standMask().

Referenced by doUndoDropMove().

## epilogueSimple()

void osl::NumEffectState::epilogueSimple | ( | Square | from,
|  | Square | to,
|  | Piece | oldPiece,
|  | int | num,
|  | PtypeO | oldPtypeO,
|  | PtypeO | newPtypeO,
|  | const CArray< PieceMask, 2 > & | pin_or_open_backup,
|  | const KingMobility & | king_mobility_backup,
|  | const PieceMask & | promoted_backup,
|  | const CArray< PieceMask, 2 > & | effected_mask_backup,
|  | const CArray< PieceMask, 2 > & | effected_changed_mask_backup,
|  | const CArray< uint64_t, 2 > & | king8infos_backup,
|  | const MobilityTable & | mobility_backup )

private

Definition at line 400 of file numEffectState.cc.

References osl::NumBitmapEffect::Add, effects, osl::Piece::EMPTY(), king8infos, king_mobility, osl::newPtypeO(), pin_or_open, promoted, osl::SimpleState::setBoard(), osl::SimpleState::setPieceOf(), and osl::NumBitmapEffect::Sub.

Referenced by doUndoSimpleMove().

## findAttackAt()

template<Ptype PTYPE>

const Piece osl::NumEffectState::findAttackAt | ( | Player | attack,
|  | Square | target ) const

inline

return a piece s.t.

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

Definition at line 503 of file numEffectState.h.

References allEffectAt(), osl::Piece::EMPTY(), osl::misc::GeneralMask< Integer >::none(), osl::SimpleState::pieceOf(), and osl::misc::GeneralMask< Integer >::takeOneBit().

Referenced by osl::checkmate::OracleAdjust::attack(), osl::rating::DefenseKing8::blocking(), osl::rating::Block::count(), and osl::rating::PatternBlock::find().

## findAttackAtStrict()

template<Ptype PTYPE>

const Piece osl::NumEffectState::findAttackAtStrict | ( | Player | attack,
|  | Square | target ) const

inline

Definition at line 511 of file numEffectState.h.

References allEffectAt(), osl::Piece::EMPTY(), osl::isPromoted(), osl::misc::GeneralMask< Integer >::none(), osl::SimpleState::pieceOf(), promoted, and osl::misc::GeneralMask< Integer >::takeOneBit().

## findAttackNotBy()

const Piece osl::NumEffectState::findAttackNotBy | ( | Player | P,
|  | Square | square,
|  | const PieceMask & | ignore ) const

inline

Definition at line 575 of file numEffectState.h.

References effectSetAt(), osl::Piece::EMPTY(), osl::SimpleState::pieceOf(), osl::SimpleState::pieces, and piecesOnBoard().

## findCheapAttack()

const Piece osl::NumEffectState::findCheapAttack | ( | Player | P,
|  | Square | square ) const

inline

Parameters

  P | - 利きをつけている側のプレイヤ
  square | - 調査する場所

Returns
  利きを付けている中で安そうな駒 (複数の場合でもEMPTYにはしない)

Definition at line 560 of file numEffectState.h.

References effectSetAt(), piecesOnBoard(), and selectCheapPiece().

Referenced by osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::move_probability::MoveInfo::adhocAdjustSlider(), osl::move_probability::CoverFork::defending(), osl::eval::ml::Promotion37::evalOne(), osl::rating::PtypeAttackedGroup::findMatch(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::move_probability::AttackFromOpposingSliders::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::FromEffect::match(), osl::move_probability::LongRecapture::match(), osl::rating::PtypeAttacked::match(), and osl::progress::ml::NewProgress::promotion37One().

## findCheapAttackNotBy()

const Piece osl::NumEffectState::findCheapAttackNotBy | ( | Player | P,
|  | Square | square,
|  | const PieceMask & | ignore ) const

inline

Parameters

  P | - 利きをつけている側のプレイヤ
  square | - 調査する場所

Returns
  利きを付けている中で安そうな駒 (複数の場合でもEMPTYにはしない)

Definition at line 569 of file numEffectState.h.

References effectSetAt(), osl::SimpleState::pieces, piecesOnBoard(), and selectCheapPiece().

## findCheckPiece()

template<Player P>

bool osl::NumEffectState::findCheckPiece | ( | Piece & | attack_piece | ) | const

inline

王手駒を探す

Returns
  王手かどうか

Parameters

  attack_piece | 一つの駒による王手の場合はattck_pieceにその駒を入れる 複数の駒による王手の場合はPiece::EMPTY()を入れる
  P(template) | 玉

Definition at line 593 of file numEffectState.h.

References hasEffectAt(), and osl::SimpleState::kingSquare().

## findEffect()

void osl::NumEffectState::findEffect | ( | Player | P,
|  | Square | target,
|  | PieceVector & | out ) const

target に利きのあるPieceをoutに格納する

Definition at line 1118 of file numEffectState.cc.

References forEachEffect().

Referenced by osl::effect_util::AdditionalEffect::count(), osl::effect_util::ShadowEffect::count(), and osl::effect_util::AdditionalEffect::find().

## findLongAttackAt() [1/4]

const Piece osl::NumEffectState::findLongAttackAt | ( | Piece | piece,
|  | Direction | d ) const

inline

Definition at line 542 of file numEffectState.h.

References findLongAttackAt(), osl::Piece::isPiece(), and osl::Piece::owner().

## findLongAttackAt() [2/4]

const Piece osl::NumEffectState::findLongAttackAt | ( | Player | owner,
|  | int | piece,
|  | Direction | d ) const

inline

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

Parameters

  d | piece からみた向き

Definition at line 526 of file numEffectState.h.

References osl::BLACK, effects, osl::Piece::EMPTY(), osl::EMPTY_NUM, osl::inverse(), and osl::SimpleState::pieceOf().

Referenced by findLongAttackAt(), findLongAttackAt(), and findLongAttackAt().

## findLongAttackAt() [3/4]

const Piece osl::NumEffectState::findLongAttackAt | ( | Player | owner,
|  | Piece | piece,
|  | Direction | d ) const

inline

Definition at line 536 of file numEffectState.h.

References findLongAttackAt(), osl::Piece::isPiece(), osl::Piece::number(), and osl::Piece::owner().

## findLongAttackAt() [4/4]

const Piece osl::NumEffectState::findLongAttackAt | ( | Square | square,
|  | Direction | d ) const

inline

Definition at line 547 of file numEffectState.h.

References findLongAttackAt(), and osl::SimpleState::pieceOnBoard().

## findThreatenedPiece()

const osl::Piece osl::NumEffectState::findThreatenedPiece | ( | Player | P | ) | const

取られそうなPの駒で価値が最大のもの

Definition at line 138 of file numEffectState.cc.

References osl::alt(), osl::misc::GeneralMask< Integer >::any(), osl::misc::GeneralMask< Integer >::bsr(), osl::PieceMask::clearBit(), effectedMask(), osl::Piece::EMPTY(), osl::PieceMask::getMask(), inCheck(), osl::LANCE, osl::PAWN, osl::Piece_Table, osl::SimpleState::pieceOf(), osl::SimpleState::pieces, piecesOnBoard(), promoted, promotedPieces(), and osl::Ptype_Table.

## forEachEffect() [1/4]

template<Player P, class Action>

void osl::NumEffectState::forEachEffect | ( | const PieceMask & | pieces,
|  | Square | sq,
|  | Action & | action ) const

inline private

Definition at line 754 of file numEffectState.h.

References osl::misc::GeneralMask< Integer >::any(), osl::SimpleState::pieceOf(), osl::SimpleState::pieces, and osl::misc::GeneralMask< Integer >::takeOneBit().

Referenced by findEffect(), osl::eval::See::findEffectPieces(), osl::eval::See::findEffectPiecesAfterMove(), forEachEffect(), forEachEffect(), forEachEffect(), and forEachEffectNotBy().

## forEachEffect() [2/4]

template<class Action>

void osl::NumEffectState::forEachEffect | ( | Player | P,
|  | Square | pos,
|  | Action & | a ) const

inline

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

Parameters

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

Definition at line 888 of file numEffectState.h.

References osl::BLACK, and forEachEffect().

## forEachEffect() [3/4]

template<Player P, class Action>

void osl::NumEffectState::forEachEffect | ( | Square | sq,
|  | Action & | action ) const

inline

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

Parameters

  action | たとえば AlwaysMoveAction

Definition at line 784 of file numEffectState.h.

References effectSetAt(), forEachEffect(), and piecesOnBoard().

## forEachEffect() [4/4]

template<Player P, class Action>

void osl::NumEffectState::forEachEffect | ( | Square | sq,
|  | Action & | action,
|  | const PieceMask & | pin ) const

inline

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

Parameters

  pin | 無視する駒
  action | たとえば AlwaysMoveAction

Definition at line 795 of file numEffectState.h.

References effectSetAt(), forEachEffect(), piecesOnBoard(), and pin().

## forEachEffectNotBy()

template<Player P, class Action>

void osl::NumEffectState::forEachEffectNotBy | ( | Square | sq,
|  | Piece | piece,
|  | Action & | action ) const

inline

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

Parameters

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

Definition at line 808 of file numEffectState.h.

References effectSetAt(), forEachEffect(), osl::Piece::number(), osl::SimpleState::pieces, and piecesOnBoard().

## forEachEffectOfPiece() [1/2]

template<class Action>

void osl::NumEffectState::forEachEffectOfPiece | ( | Piece | piece,
|  | Action & | action ) const

Definition at line 1186 of file numEffectState.h.

References osl::BISHOP, osl::BLACK, forEachEffectOfPiece(), osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, NEW_PTYPEO, osl::PAWN, osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, osl::PPAWN, osl::PROOK, osl::PSILVER, osl::Piece::ptypeO(), osl::ROOK, osl::SILVER, osl::Piece::square(), and osl::WHITE.

## forEachEffectOfPiece() [2/2]

template<osl::Player P, osl::Ptype Type, class Action>

void osl::NumEffectState::forEachEffectOfPiece | ( | Square | pieceSquare,
|  | Action & | action ) const

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

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

Definition at line 1224 of file numEffectState.h.

References forEachEffectOfPieceDir(), and forEachEffectOfPieceLongDir().

Referenced by forEachEffectOfPiece(), osl::rating::ImmediateAddSupport::index(), and osl::rating::ImmediateAddSupport::match().

## forEachEffectOfPieceDir() [1/3]

template<Player P, Ptype Type, class Action, Direction Dir>

void osl::NumEffectState::forEachEffectOfPieceDir | ( | Square | pieceSquare,
|  | Action & | action ) const

inline private

Definition at line 824 of file numEffectState.h.

References forEachEffectOfPieceDir(), and osl::DirectionTraits< Dir >::mask.

## forEachEffectOfPieceDir() [2/3]

template<Player P, Ptype Type, class Action, Direction Dir>

void osl::NumEffectState::forEachEffectOfPieceDir | ( | Square | pieceSquare,
|  | Action & | action,
|  | Int2Type< true > | ) const

inline private

Definition at line 818 of file numEffectState.h.

References osl::SimpleState::pieceAt().

## forEachEffectOfPieceDir() [3/3]

template<Player P, Ptype Type, class Action, Direction Dir>

void osl::NumEffectState::forEachEffectOfPieceDir | ( | Square | ,
|  | Action & | ,
|  | Int2Type< false > | ) const

inline private

Definition at line 816 of file numEffectState.h.

Referenced by forEachEffectOfPiece(), and forEachEffectOfPieceDir().

## forEachEffectOfPieceLongDir() [1/3]

template<Player P, Ptype Type, class Action, Direction Dir>

void osl::NumEffectState::forEachEffectOfPieceLongDir | ( | Square | pieceSquare,
|  | Action & | action ) const

inline private

Definition at line 841 of file numEffectState.h.

References forEachEffectOfPieceLongDir(), and osl::DirectionTraits< Dir >::mask.

## forEachEffectOfPieceLongDir() [2/3]

template<Player P, Ptype Type, class Action, Direction Dir>

void osl::NumEffectState::forEachEffectOfPieceLongDir | ( | Square | pieceSquare,
|  | Action & | action,
|  | Int2Type< true > | ) const

inline private

Definition at line 830 of file numEffectState.h.

References osl::Offset::intValue(), osl::Piece::isEmpty(), and osl::SimpleState::pieceAt().

## forEachEffectOfPieceLongDir() [3/3]

template<Player P, Ptype Type, class Action, Direction Dir>

void osl::NumEffectState::forEachEffectOfPieceLongDir | ( | Square | ,
|  | Action & | ,
|  | Int2Type< false > | ) const

inline private

Definition at line 828 of file numEffectState.h.

Referenced by forEachEffectOfPiece(), and forEachEffectOfPieceLongDir().

## forEachEffectOfPtypeO() [1/2]

template<Player P, class Function, bool InterestEmpty>

void osl::NumEffectState::forEachEffectOfPtypeO | ( | Square | ,
|  | Ptype | ,
|  | Function & | f ) const

## forEachEffectOfPtypeO() [2/2]

template<class Function, bool InterestEmpty>

void osl::NumEffectState::forEachEffectOfPtypeO | ( | Square | ,
|  | PtypeO | ,
|  | Function & | f ) const

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

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

Parameters

  InterestEmpty | 空白のマスに興味があるか

## forEachOnBoard()

template<Player P, Ptype T, typename F>

void osl::NumEffectState::forEachOnBoard | ( | F & | func | ) | const

inline

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

Definition at line 727 of file numEffectState.h.

References osl::misc::GeneralMask< Integer >::any(), osl::SimpleState::pieceOf(), piecesOnBoard(), and osl::misc::GeneralMask< Integer >::takeOneBit().

## forEachOnBoardPtypeStrict()

template<Player P, Ptype T, typename F>

void osl::NumEffectState::forEachOnBoardPtypeStrict | ( | F & | func | ) | const

inline

T の成不成を区別

Definition at line 739 of file numEffectState.h.

References osl::misc::GeneralMask< Integer >::any(), osl::isPromoted(), osl::SimpleState::pieceOf(), piecesOnBoard(), promoted, and osl::misc::GeneralMask< Integer >::takeOneBit().

## generateAllUnsafe()

void osl::NumEffectState::generateAllUnsafe | ( | MoveVector & | out | ) | const

自殺を含めてすべての手を生成

Definition at line 1081 of file numEffectState.cc.

References osl::move_generator::AllMoves< Action >::generate(), and osl::SimpleState::turn().

## generateLegal()

void osl::NumEffectState::generateLegal | ( | MoveVector & | moves | ) | const

全ての合法手を生成する.

玉の素抜きや打歩詰の確認をする． ただし, 打歩詰め絡み以外では有利にはならない手 （Move::ignoredUnpromote）は生成しない.

Definition at line 1086 of file numEffectState.cc.

References osl::FixedCapacityVector< T, Capacity >::begin(), osl::FixedCapacityVector< T, Capacity >::end(), osl::GenerateAllMoves::generate(), osl::GenerateEscapeKing::generate(), inCheck(), and osl::SimpleState::turn().

Referenced by osl::rating::BradleyTerry::addSquare(), osl::move_probability::FeatureSet::generateRating(), and generateWithFullUnpromotions().

## generateWithFullUnpromotions()

void osl::NumEffectState::generateWithFullUnpromotions | ( | MoveVector & | moves | ) | const

打歩詰め絡み以外では有利にはならない手も含め, 全ての合法手を生成す る（Move::ignoredUnpromoteも生成する）.

玉の素抜きや打歩詰の確認 をする．

Definition at line 1105 of file numEffectState.cc.

References generateLegal(), osl::Move::hasIgnoredUnpromote(), inCheck(), osl::FixedCapacityVector< T, Capacity >::push_back(), osl::FixedCapacityVector< T, Capacity >::size(), and osl::Move::unpromote().

Referenced by osl::record::KanjiMove::strToMove().

## hasChangedEffects()

bool osl::NumEffectState::hasChangedEffects | ( |  | ) | const

inline

Definition at line 141 of file numEffectState.h.

References osl::BLACK, and effects.

Referenced by changedEffects().

## hasEffectAt() [1/4]

bool osl::NumEffectState::hasEffectAt | ( | Player | P,
|  | Square | target,
|  | Piece & | attackerPiece ) const

inline

Definition at line 597 of file numEffectState.h.

References osl::BLACK, and hasEffectAt().

## hasEffectAt() [2/4]

bool osl::NumEffectState::hasEffectAt | ( | Player | player,
|  | Square | target ) const

inline

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

Parameters

  player | 攻撃側
  target | 対象のマス

Definition at line 335 of file numEffectState.h.

References effectSetAt(), osl::PieceMask::getMask(), osl::Square::isOnBoard(), osl::misc::GeneralMask< Integer >::none(), and osl::NumBitmapEffect::playerEffectMask().

## hasEffectAt() [3/4]

template<Player P>

bool osl::NumEffectState::hasEffectAt | ( | Square | target | ) | const

inline

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

Parameters

  player | 攻撃側
  target | 対象のマス

Definition at line 324 of file numEffectState.h.

References effectSetAt(), osl::PieceMask::getMask(), osl::Square::isOnBoard(), osl::misc::GeneralMask< Integer >::none(), and osl::NumBitmapEffect::playerEffectMask().

Referenced by osl::eval::ml::KnightFork::accumulate(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::King5x5Ptype::addOne(), osl::eval::ml::KnightCheck::canCheck(), osl::enter_king::EnterKing::canDeclareWin(), osl::enter_king::EnterKing::canDeclareWin(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::rating::DefenseKing8::count(), osl::mobility::countMobilityBoth(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King25EffectEach< 2 >::effectState(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), findCheckPiece(), osl::eval::ml::BishopRookFork::findDropInLine(), osl::rating::BadLanceGroup::findMatch(), osl::rating::ChaseGroup::findMatch(), osl::checkmate::Dfpn::generateEscape(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::rating::FeatureSet::generateRating(), hasEffectAt(), osl::checkmate::King8Info::hasEffectMask(), osl::checkmate::Dfpn::hasEscapeMove(), inCheck(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), inUnblockableCheck(), osl::eval::ml::KingXBlockedBase::isBlocked(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), osl::move_probability::MoveFromOpposingSliders::longPtype(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::PromotionBySacrifice::match(), osl::rating::BadLance::match(), osl::rating::Chase::match(), osl::rating::CheckmateIfCapture::match(), osl::rating::ToSupported::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), NumEffectState(), osl::effect_util::SendOffSquare::onlyOneSupport(), prologueCapture(), prologueDrop(), prologueSimple(), osl::eval::ml::BishopRookFork::testCenter(), and wasCheckEvasion().

## hasEffectAt() [4/4]

template<Player P>

bool osl::NumEffectState::hasEffectAt | ( | Square | target,
|  | Piece & | attackerPiece ) const

inline

Parameters

  P(template) | - 利きをつけている側のプレイヤ
  target | - 利きをつけられた場所
  attackerPiece | - multiple attackの場合はPiece::EMPTY() そうでないなら利きをつけている駒を返す

mask|=0x8000000000000000ll; if((mask&(mask-1))!=0x8000000000000000ll) なら1つのif文で済む

Definition at line 611 of file numEffectState.h.

References osl::misc::GeneralMask< Integer >::bsf(), effectSetAt(), osl::Piece::EMPTY(), osl::PieceMask::getMask(), osl::misc::GeneralMask< Integer >::hasMultipleBit(), osl::misc::GeneralMask< Integer >::none(), osl::SimpleState::pieceOf(), and piecesOnBoard().

## hasEffectByNotPinned()

bool osl::NumEffectState::hasEffectByNotPinned | ( | Player | pl,
|  | Square | target ) const

inline

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

Definition at line 428 of file numEffectState.h.

References osl::PieceMask::any(), effectSetAt(), osl::Square::isOnBoard(), piecesOnBoard(), and pinOrOpen().

## hasEffectByNotPinnedAndKing()

bool osl::NumEffectState::hasEffectByNotPinnedAndKing | ( | Player | pl,
|  | Square | target ) const

inline

{pinされている駒, 玉以外}からの利きがある.

Definition at line 419 of file numEffectState.h.

References osl::PieceMask::any(), osl::PieceMask::clearBit(), effectSetAt(), osl::Square::isOnBoard(), osl::KING, piecesOnBoard(), and pinOrOpen().

## hasEffectByPiece()

bool osl::NumEffectState::hasEffectByPiece | ( | Piece | attack,
|  | Square | target ) const

inline

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

Parameters

  target | 対象のマス

Definition at line 450 of file numEffectState.h.

References effectSetAt(), osl::Square::isOnBoard(), osl::Piece::isPiece(), osl::Piece::number(), and osl::PieceMask::test().

Referenced by osl::move_probability::BlockLong::addPiece(), osl::move_probability::MoveInfo::adhocAdjustAttackCheckmateDefender(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::move_probability::MoveInfo::adhocAdjustSlider(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::rating::AttackKing8Group::findMatch(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::rating::ImmediateAddSupport::index(), osl::rating::PinAttack::index(), isAlmostValidMove(), osl::move_probability::LongRecapture::match(), osl::rating::AttackKing8::match(), and osl::rating::PinAttack::match().

## hasEffectByPtype()

template<Ptype PTYPE>

bool osl::NumEffectState::hasEffectByPtype | ( | Player | attack,
|  | Square | target ) const

inline

target に ptype の利きがあるか?

成不成を区別しない

Definition at line 355 of file numEffectState.h.

References allEffectAt(), and osl::misc::GeneralMask< Integer >::any().

Referenced by osl::rating::Block::count(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::rating::CountOpen::index(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), and osl::rating::Check::openLong().

## hasEffectByPtypeStrict()

template<Ptype PTYPE>

bool osl::NumEffectState::hasEffectByPtypeStrict | ( | Player | attack,
|  | Square | target ) const

inline

target に ptype の利きがあるか?

成不成を区別

Definition at line 363 of file numEffectState.h.

References allEffectAt(), osl::misc::GeneralMask< Integer >::any(), osl::isPromoted(), and promoted.

Referenced by osl::eval::ml::KnightCheck::canCheck(), osl::rating::Threatmate::captureForKnightCheck(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::rating::Threatmate::isCandidate(), osl::eval::ml::PinPtypeAll::pawnAttack(), and osl::progress::ml::NewProgress::updatePawnFacing().

## hasEffectByWithRemove() [1/2]

bool osl::NumEffectState::hasEffectByWithRemove | ( | Player | player,
|  | Square | target,
|  | Square | removed ) const

inline

Definition at line 490 of file numEffectState.h.

References osl::BLACK, and hasEffectByWithRemove().

## hasEffectByWithRemove() [2/2]

template<Player P>

bool osl::NumEffectState::hasEffectByWithRemove | ( | Square | target,
|  | Square | removed ) const

Referenced by hasEffectByWithRemove().

## hasEffectIf()

bool osl::NumEffectState::hasEffectIf | ( | PtypeO | ptypeo,
|  | Square | attacker,
|  | Square | target ) const

inline

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

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

Definition at line 465 of file numEffectState.h.

References osl::Board_Table, osl::SimpleState::isEmptyBetween(), and osl::Ptype_Table.

Referenced by osl::eval::ml::MajorCheckWithCapture::addOne(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::move_probability::MoveInfo::adhocAdjustKeepCheckmateDefender(), osl::move_probability::KingBlockade::blockAll(), osl::move_probability::CoverFork::defending(), osl::rating::ChaseGroup::findMatch(), osl::rating::ImmediateEscapeGroup::findMatchWithoutProgress(), osl::effect_util::Neighboring8Direct::hasEffectFromTo(), osl::rating::ImmediateAddSupport::index(), osl::rating::PinAttack::index(), osl::rating::Threatmate::isCandidate(), osl::move_probability::BreakThreatmate::isDefendingThreatmate(), osl::move_classifier::DirectCheck< P >::isMember(), osl::move_probability::AttackKing8Long::match(), osl::move_probability::AttackToOpposingSliders::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::KingBlockade::match(), osl::move_probability::LureDefender::match(), osl::move_probability::PromotionBySacrifice::match(), osl::rating::Chase::match(), osl::rating::ImmediateEscape::match(), osl::rating::PinAttack::match(), and wasCheckEvasion().

## hasEffectInDirection()

template<Direction Dir, Player P>

bool osl::NumEffectState::hasEffectInDirection | ( | Square | to | ) | const

inline

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

64bit版対応済み

Definition at line 377 of file numEffectState.h.

References osl::misc::GeneralMask< Integer >::any(), osl::BLACK, osl::Board_Table, osl::PtypeDirectionTraits< T, D >::canMove, effectSetAt(), osl::PieceMask::getMask(), osl::PtypeFuns< T >::indexMask, osl::DirectionTraits< Dir >::isLong, osl::NumBitmapEffect::longEffectMask(), osl::misc::GeneralMask< mask_int_t >::makeDirect(), osl::SimpleState::pieceOf(), pieces_onboard, piecesOnBoard(), osl::Piece::square(), and osl::misc::GeneralMask< Integer >::takeOneBit().

## hasEffectNotBy()

bool osl::NumEffectState::hasEffectNotBy | ( | Player | player,
|  | Piece | piece,
|  | Square | target ) const

inline

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

Parameters

  player | 攻撃側
  piece | 攻撃側の駒
  target | 対象のマス

Definition at line 409 of file numEffectState.h.

References effectSetAt(), osl::Piece::number(), osl::Piece::owner(), pieces_onboard, and piecesOnBoard().

Referenced by osl::eval::ml::AttackMajorsInBase::addOne(), osl::rating::Threatmate::captureForKnightCheck(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::BishopRookFork::findDropInLine(), osl::checkmate::Dfpn::generateEscape(), and osl::eval::ml::BishopRookFork::testCenter().

## hasLongEffectAt()

template<Ptype PTYPE>

bool osl::NumEffectState::hasLongEffectAt | ( | Player | P,
|  | Square | to ) const

inline

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

Definition at line 346 of file numEffectState.h.

References osl::misc::GeneralMask< Integer >::any(), osl::BISHOP, osl::LANCE, longEffectAt(), and osl::ROOK.

Referenced by osl::eval::ml::MajorCheckWithCapture::addOne().

## hasMultipleEffectAt()

bool osl::NumEffectState::hasMultipleEffectAt | ( | Player | player,
|  | Square | target ) const

inline

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

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

Parameters

  player | 攻撃側
  target | 対象のマス

Definition at line 439 of file numEffectState.h.

References effectSetAt(), osl::PieceMask::getMask(), osl::NumBitmapEffect::playerEffect(), and osl::NumBitmapEffect::playerEffectMask().

## Iking8Info()

uint64_t osl::NumEffectState::Iking8Info | ( | Player | king | ) | const

inline

Definition at line 78 of file numEffectState.h.

References king8infos.

Referenced by osl::checkmate::ProofNumberTable::attackEstimation(), osl::eval::ml::CanCheckNonPawnPieceStandCombination::canCheck(), osl::checkmate::ProofNumberTable::countLiberty(), osl::eval::ml::King8EffectAll::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::KingXBothBlocked::eval(), osl::eval::ml::KingXBlockedBase::isBlocked(), isConsistent(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), king8Info(), osl::checkmate::ProofNumberTable::libertyAfterAllDrop(), and osl::checkmate::ProofNumberTable::libertyAfterAllMove().

## inCheck() [1/2]

bool osl::NumEffectState::inCheck | ( |  | ) | const

inline

手番の玉が王手状態

Definition at line 98 of file numEffectState.h.

References inCheck(), and osl::SimpleState::turn().

Referenced by inCheck().

## inCheck() [2/2]

bool osl::NumEffectState::inCheck | ( | Player | P | ) | const

inline

Pの玉が王手状態

Definition at line 88 of file numEffectState.h.

References osl::alt(), hasEffectAt(), osl::Square::isPieceStand(), and osl::SimpleState::kingSquare().

Referenced by osl::rating::BradleyTerry::accumulate(), osl::rating::FeatureSet::annotate(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::rating::KingEscapeGroup::findMatch(), osl::checkmate::DualDfpn::findProof(), findThreatenedPiece(), osl::checkmate::Dfpn::generateCheck(), generateLegal(), osl::rating::FeatureSet::generateRating(), generateWithFullUnpromotions(), osl::rating::Threatmate::isCandidate(), osl::rating::FeatureSet::logProbKingEscape(), osl::rating::FeatureSet::logProbSeePlus(), osl::rating::FeatureSet::logProbTakeBack(), osl::record::CsaFile::makeInfo(), osl::move_probability::CheckmateIfCapture::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::PromotionBySacrifice::match(), osl::rating::KingEscape::match(), and osl::RepetitionCounter::push().

## inUnblockableCheck()

bool osl::NumEffectState::inUnblockableCheck | ( | Player | target | ) | const

inline

target の王に合駒可能でない王手がかかっているかどうか.

- 両王手 => 真
- unblockable な利きだけ => 真
- blockable な利きだけ => 偽
- 王手でない => 偽 2014/03

Definition at line 107 of file numEffectState.h.

References osl::alt(), osl::Piece::EMPTY(), hasEffectAt(), osl::SimpleState::kingSquare(), osl::Ptype_Table, osl::Piece::ptypeO(), and osl::Piece::square().

Referenced by osl::checkmate::ProofPieces::leaf(), and osl::checkmate::Dfpn::Node::setCheckmateDefense().

## isAlmostValidMove() [1/2]

template<bool show_error>

bool osl::NumEffectState::isAlmostValidMove | ( | Move | move | ) | const

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

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

Parameters

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

Definition at line 823 of file numEffectState.cc.

References osl::Move::from(), hasEffectByPiece(), osl::SimpleState::isAlmostValidDrop(), osl::Move::isNormal(), osl::Square::isPieceStand(), osl::Move::isValid(), osl::SimpleState::isValidMoveByRule(), osl::SimpleState::pieceAt(), osl::Move::player(), osl::SimpleState::testValidityOtherThanEffect(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by osl::checkmate::Dfpn::analyze(), osl::checkmate::OracleAdjust::attack(), isAlmostValidMove(), makeMove(), makeUnmakeMove(), and osl::eval::See::seeInternal().

## isAlmostValidMove() [2/2]

bool osl::NumEffectState::isAlmostValidMove | ( | Move | move,
|  | bool | show_error = true ) const

Definition at line 846 of file numEffectState.cc.

References isAlmostValidMove().

## isCheck()

bool osl::NumEffectState::isCheck | ( | Move | move | ) | const

Definition at line 1058 of file numEffectState.cc.

Referenced by osl::RepetitionCounter::push().

## isConsistent() [1/2]

bool osl::NumEffectState::isConsistent | ( | bool | showError = true | ) | const

Definition at line 663 of file numEffectState.cc.

References osl::alt(), osl::effect::NumSimpleEffectTable::effectedNumTable, effects, osl::effect::NumSimpleEffectTable::effectSetAt(), Iking8Info(), osl::indexToPlayer(), osl::SimpleState::isConsistent(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::SimpleState::kingSquare(), osl::King8Info::make(), osl::SimpleState::pieceOf(), pin(), promoted, osl::Piece::SIZE, and osl::checkmate::King8Info::uint64Value().

Referenced by osl::record::CheckDuplicate::getLastState(), osl::record::KisenPlusFile::load(), osl::record::KisenFile::moves(), and osl::operator==().

## isConsistent() [2/2]

bool osl::NumEffectState::isConsistent | ( | const NumEffectState & | prev,
|  | Move | moved,
|  | bool | show_error = true ) const

局面更新に関する一貫性をテスト

Definition at line 734 of file numEffectState.cc.

References osl::BLACK, changedEffects(), changedPieces(), effectedChanged(), effectedMask(), effectSetAt(), osl::indexToPlayer(), NumEffectState(), osl::SimpleState::pieceOf(), piecesOnBoard(), osl::Piece::SIZE, osl::Piece::square(), osl::container::BoardMask::test(), osl::PieceMask::test(), osl::Move::to(), and osl::WHITE.

## isDirectCheck()

bool osl::NumEffectState::isDirectCheck | ( | Move | move | ) | const

Definition at line 1068 of file numEffectState.cc.

Referenced by osl::rating::CheckGroup::findMatch(), and osl::rating::Check::match().

## isOnBoardNum()

bool osl::NumEffectState::isOnBoardNum | ( | int | num | ) | const

inline

Definition at line 170 of file numEffectState.h.

References osl::BLACK, piecesOnBoard(), osl::PieceMask::test(), and osl::WHITE.

## isOpenCheck()

bool osl::NumEffectState::isOpenCheck | ( | Move | move | ) | const

Definition at line 1074 of file numEffectState.cc.

Referenced by osl::rating::CheckGroup::findMatch(), and osl::rating::Check::match().

## isPawnDropCheckmate()

bool osl::NumEffectState::isPawnDropCheckmate | ( | Move | move | ) | const

Definition at line 1063 of file numEffectState.cc.

## isSafeMove()

bool osl::NumEffectState::isSafeMove | ( | Move | move | ) | const

Definition at line 1053 of file numEffectState.cc.

## king8Info()

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

Definition at line 43 of file numEffectState.cc.

References Iking8Info().

Referenced by osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::rating::Threatmate::isCandidate(), and osl::move_probability::PatternCommon::updateCacheOne().

## kingMobilityAbs()

Square osl::NumEffectState::kingMobilityAbs | ( | Player | p,
|  | Direction | d ) const

inline

Definition at line 183 of file numEffectState.h.

References king_mobility, and osl::Square::makeDirect().

Referenced by osl::eval::ml::KingMobility::evalOne(), osl::eval::ml::KingMobilitySum::evalOne(), and kingMobilityOfPlayer().

## kingMobilityOfPlayer()

Square osl::NumEffectState::kingMobilityOfPlayer | ( | Player | p,
|  | Direction | d ) const

inline

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

Parameters

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

Definition at line 192 of file numEffectState.h.

References osl::BLACK, osl::inverse(), and kingMobilityAbs().

Referenced by osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional().

## longEffectAt() [1/4]

const mask_t osl::NumEffectState::longEffectAt | ( | Square | target | ) | const

inline

Definition at line 306 of file numEffectState.h.

References effectSetAt(), and osl::effect::NumBitmapEffect::selectLong().

## longEffectAt() [2/4]

template<Ptype PTYPE>

const mask_t osl::NumEffectState::longEffectAt | ( | Square | target | ) | const

inline

Definition at line 298 of file numEffectState.h.

References effectSetAt(), and osl::effect::NumBitmapEffect::selectLong().

Referenced by osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::move_probability::BlockLong::findAll(), hasLongEffectAt(), osl::rating::Threatmate::isCandidate(), osl::move_probability::BreakThreatmate::isDefendingKing8(), longEffectAt(), osl::move_probability::MoveFromOpposingSliders::longPtype(), osl::checkmate::King8Info::make(), osl::move_probability::FromEffectLong::match(), and osl::move_probability::PromotionBySacrifice::match().

## longEffectAt() [3/4]

const mask_t osl::NumEffectState::longEffectAt | ( | Square | target,
|  | Player | owner ) const

inline

Definition at line 310 of file numEffectState.h.

References osl::PieceMask::getMask(), longEffectAt(), and piecesOnBoard().

## longEffectAt() [4/4]

template<Ptype PTYPE>

const mask_t osl::NumEffectState::longEffectAt | ( | Square | target,
|  | Player | owner ) const

inline

Definition at line 302 of file numEffectState.h.

References osl::PieceMask::getMask(), longEffectAt(), and piecesOnBoard().

## longEffectChanged()

template<Ptype PTYPE>

bool osl::NumEffectState::longEffectChanged | ( |  | ) | const

inline

Definition at line 155 of file numEffectState.h.

References changedPieces().

Referenced by osl::eval::ml::OpenMidEndingEval::updateSub().

## longEffectNumTable()

const EffectedNumTable & osl::NumEffectState::longEffectNumTable | ( |  | ) | const

inline

Definition at line 124 of file numEffectState.h.

References effects.

Referenced by osl::effect_util::AdditionalOrShadow::count(), osl::effect_util::AdditionalEffect::hasEffect(), makePinOpenDir(), pinAttacker(), and recalcPinOpen().

## makeKing8Info()

template<osl::Player P>

template void osl::NumEffectState::makeKing8Info< WHITE > | ( |  | ) |

private

Definition at line 50 of file numEffectState.cc.

References osl::alt(), king8infos, osl::SimpleState::kingSquare(), osl::King8Info::make(), and osl::checkmate::King8Info::uint64Value().

Referenced by NumEffectState(), prologueCapture(), prologueDrop(), and prologueSimple().

## makeMove()

void osl::NumEffectState::makeMove | ( | Move | move | ) |

Definition at line 201 of file numEffectState.cc.

References osl::captured(), osl::SimpleState::changeTurn(), doCaptureMove(), doDropMove(), doSimpleMove(), osl::Piece::EMPTY(), osl::Move::from(), isAlmostValidMove(), osl::Move::isPass(), osl::Square::isPieceStand(), makeMovePass(), osl::SimpleState::pieceOnBoard(), osl::Move::player(), osl::Move::promoteMask(), osl::Move::ptype(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by osl::rating::BradleyTerry::accumulate(), osl::checkmate::Dfpn::analyze(), osl::record::CheckDuplicate::getLastState(), osl::record::KisenPlusFile::load(), osl::record::CsaFile::makeInfo(), osl::record::KisenFile::moves(), osl::usi::parse(), osl::usi::parse(), osl::csa::CsaFileMinimal::parseLine(), osl::kakinoki::KakinokiFile::parseLine(), osl::ki2::Ki2File::parseLine(), osl::record::KisenWriter::save(), osl::ki2::show(), and osl::book::WeightedBook::validate().

## makeMovePass()

void osl::NumEffectState::makeMovePass | ( |  | ) |

inline

Definition at line 668 of file numEffectState.h.

References osl::SimpleState::changeTurn(), and effects.

Referenced by makeMove().

## makePinOpen() [1/2]

void osl::NumEffectState::makePinOpen | ( | osl::Player | defense | ) |

private

Definition at line 900 of file numEffectState.cc.

References osl::SimpleState::kingSquare(), makePinOpen(), and pin_or_open.

## makePinOpen() [2/2]

osl::PieceMask osl::NumEffectState::makePinOpen | ( | osl::Square | target,
|  | osl::Player | defense )

private

Definition at line 883 of file numEffectState.cc.

References osl::alt(), osl::Square::isPieceStand(), makePinOpenDir(), and piecesOnBoard().

Referenced by makePinOpen(), NumEffectState(), prologueCapture(), and prologueSimple().

## makePinOpenDir()

template<Direction DIR>

void osl::NumEffectState::makePinOpenDir | ( | Square | target,
|  | PieceMask & | pins,
|  | PieceMask const & | onBoard,
|  | Player | defense )

inline private

Definition at line 983 of file numEffectState.h.

References osl::DirectionTraits< Dir >::blackOffset(), osl::Piece::isEdgeNum(), osl::Piece::isEmptyNum(), osl::Piece::isPieceNum(), king_mobility, longEffectNumTable(), osl::SimpleState::pieceAt(), osl::PieceMask::set(), osl::PieceMask::test(), and osl::Square::uintValue().

Referenced by makePinOpen().

## makeUnmakeMove() [1/2]

template<class Function>

void osl::NumEffectState::makeUnmakeMove | ( | Move | move,
|  | Function & | f )

inline

Definition at line 683 of file numEffectState.h.

References osl::BLACK, makeUnmakeMove(), and osl::Move::player().

Referenced by osl::checkmate::CheckmateIfCapture::effectiveAttack(), makeUnmakeMove(), and osl::rating::Threatmate::match().

## makeUnmakeMove() [2/2]

template<Player P, class Function>

void osl::NumEffectState::makeUnmakeMove | ( | Player2Type< P > | player,
|  | Move | move,
|  | Function & | f )

inline

Definition at line 691 of file numEffectState.h.

References osl::captured(), doUndoCaptureMove(), doUndoDropMove(), doUndoSimpleMove(), osl::Piece::EMPTY(), osl::Move::from(), isAlmostValidMove(), osl::Move::isPass(), osl::Square::isPieceStand(), osl::Move::isValid(), makeUnmakePass(), osl::SimpleState::pieceAt(), osl::Move::player(), osl::Move::promoteMask(), osl::Move::ptype(), osl::Move::to(), and osl::SimpleState::turn().

## makeUnmakePass()

template<class Function>

void osl::NumEffectState::makeUnmakePass | ( | Function & | f | ) |

inline

Definition at line 676 of file numEffectState.h.

References osl::SimpleState::changeTurn(), and osl::Square::STAND().

Referenced by makeUnmakeMove().

## mobilityOf() [1/2]

Square osl::NumEffectState::mobilityOf | ( | Direction | d,
|  | int | num ) const

inline

Definition at line 175 of file numEffectState.h.

References effects.

Referenced by osl::mobility::BishopMobility::countAll(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::RookMobility::countHorizontalAll(), osl::mobility::RookMobility::countVerticalAll(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::RookRookPiece::eval(), osl::move_probability::BlockLong::makeLongAttackOne(), and mobilityOf().

## mobilityOf() [2/2]

Square osl::NumEffectState::mobilityOf | ( | Direction | d,
|  | Piece | p ) const

inline

Definition at line 179 of file numEffectState.h.

References mobilityOf(), and osl::Piece::number().

## piecesOnBoard()

const PieceMask & osl::NumEffectState::piecesOnBoard | ( | Player | p | ) | const

inline

Definition at line 63 of file numEffectState.h.

References pieces_onboard.

Referenced by osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::PiecePairKing::addSub(), allEffectAt(), checkShadow(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::progress::Effect5x3WithBonus::countEffectPieces(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::KnightFork::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25EffectCountCombination::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::move_probability::ToEffect::find(), findAttackNotBy(), findCheapAttack(), findCheapAttackNotBy(), findThreatenedPiece(), forEachEffect(), forEachEffect(), forEachEffectNotBy(), forEachOnBoard(), forEachOnBoardPtypeStrict(), osl::effect_util::AdditionalEffect::hasEffect(), hasEffectAt(), hasEffectByNotPinned(), hasEffectByNotPinnedAndKing(), hasEffectInDirection(), hasEffectNotBy(), osl::rating::ImmediateAddSupport::index(), isConsistent(), isOnBoardNum(), longEffectAt(), osl::checkmate::King8Info::make(), makePinOpen(), osl::move_probability::CoverFork::match(), osl::move_probability::ToEffectLong::match(), pin(), recalcPinOpen(), osl::eval::ml::PiecePairKing::sub(), osl::progress::ml::NewProgress::updateAttack5x5Pieces(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), and osl::progress::ml::NewProgress::updatePawnFacing().

## pin()

const PieceMask osl::NumEffectState::pin | ( | Player | king | ) | const

inline

Definition at line 65 of file numEffectState.h.

References piecesOnBoard(), and pin_or_open.

Referenced by osl::eval::ml::PinPtypeAll::evalOne(), forEachEffect(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), isConsistent(), osl::checkmate::King8Info::make(), osl::rating::RatingEnv::make(), and wasCheckEvasion().

## pinAttacker() [1/2]

Piece osl::NumEffectState::pinAttacker | ( | Piece | pinned | ) | const

inline

Definition at line 248 of file numEffectState.h.

References osl::BLACK, osl::Piece::owner(), and pinAttacker().

## pinAttacker() [2/2]

template<Player P>

Piece osl::NumEffectState::pinAttacker | ( | Piece | pinned | ) | const

inline

Pのpinされた駒から，そのpinの原因となっている長い利きを持つ駒を得る．

Definition at line 240 of file numEffectState.h.

References osl::BLACK, osl::inverseUnsafe(), longEffectNumTable(), osl::Piece::number(), osl::Piece::owner(), osl::SimpleState::pieceOf(), pinnedDir(), and pinOrOpen().

Referenced by osl::eval::See::computeValue(), and pinAttacker().

## pinnedCanMoveTo() [1/2]

bool osl::NumEffectState::pinnedCanMoveTo | ( | Piece | p,
|  | Square | to ) const

inline

Definition at line 229 of file numEffectState.h.

References osl::BLACK, osl::Piece::owner(), and pinnedCanMoveTo().

## pinnedCanMoveTo() [2/2]

template<Player P>

bool osl::NumEffectState::pinnedCanMoveTo | ( | Piece | p,
|  | Square | to ) const

inline

pinされた駒pがtoに動けるか?

pinに関係がなければtoへ動けるという前提

Definition at line 222 of file numEffectState.h.

References osl::Board_Table, osl::Piece::owner(), pinnedDir(), osl::primDir(), osl::primDirUnsafe(), and osl::Piece::square().

Referenced by osl::eval::See::computeValue(), and pinnedCanMoveTo().

## pinnedDir() [1/2]

Direction osl::NumEffectState::pinnedDir | ( | Piece | p | ) | const

inline

Definition at line 210 of file numEffectState.h.

References osl::BLACK, osl::Piece::owner(), and pinnedDir().

## pinnedDir() [2/2]

template<Player P>

Direction osl::NumEffectState::pinnedDir | ( | Piece | p | ) | const

inline

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

Pから見たdirectionを返す

Definition at line 203 of file numEffectState.h.

References osl::Board_Table, osl::SimpleState::kingSquare(), osl::Piece::number(), osl::Piece::owner(), pinOrOpen(), and osl::Piece::square().

Referenced by osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), pinAttacker(), pinnedCanMoveTo(), pinnedDir(), and wasCheckEvasion().

## pinOrOpen()

PieceMask osl::NumEffectState::pinOrOpen | ( | Player | king | ) | const

inline

Definition at line 74 of file numEffectState.h.

References pin_or_open.

Referenced by osl::checkmate::Dfpn::generateCheck(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), hasEffectByNotPinned(), hasEffectByNotPinnedAndKing(), osl::move_classifier::KingOpenMove< P >::isMember(), pinAttacker(), pinnedDir(), and osl::move_probability::PatternCommon::updateCacheOne().

## prologueCapture()

template<osl::Player P>

template void osl::NumEffectState::prologueCapture | ( | Player2Type< P > | ,
|  | Square | from,
|  | Square | to,
|  | Piece | target,
|  | int | promoteMask,
|  | Piece & | oldPiece,
|  | PtypeO & | oldPtypeO,
|  | PtypeO & | capturePtypeO,
|  | PtypeO & | new_ptypeo,
|  | int & | num0,
|  | int & | num1,
|  | int & | num1Index,
|  | mask_t & | num1Mask,
|  | CArray< PieceMask, 2 > & | pin_or_open_backup,
|  | KingMobility & | king_mobility_backup,
|  | PieceMask & | promoted_backup,
|  | CArray< PieceMask, 2 > & | effected_mask_backup,
|  | CArray< PieceMask, 2 > & | effected_changed_mask_backup,
|  | CArray< uint64_t, 2 > & | king8infos_backup,
|  | MobilityTable & | mobility_backup )

private

Definition at line 530 of file numEffectState.cc.

References osl::alt(), osl::container::BoardMask::anyInRange(), osl::BLACK, osl::Board_Mask_Table3x3, osl::Piece::captured(), changedEffects(), effects, effectSetAt(), osl::Piece::EMPTY(), osl::getPtype(), hasEffectAt(), osl::KING, king8infos, king_mobility, osl::SimpleState::kingSquare(), makeKing8Info(), makePinOpen(), osl::newPtypeO(), osl::Piece::number(), osl::container::PieceMask64::numToIndex(), osl::PieceMask::numToMask(), osl::SimpleState::pieceAt(), pieces_onboard, pin_or_open, promoted, osl::Piece::promoteWithMask(), osl::PTYPE_BASIC_MIN, osl::Piece::ptypeO(), recalcPinOpen(), osl::container::BoardMask::set(), osl::SimpleState::setBoard(), osl::SimpleState::setPieceOf(), osl::SimpleState::stand_count, osl::SimpleState::standMask(), osl::UL, osl::unpromote(), and osl::WHITE.

Referenced by doCaptureMove(), and doUndoCaptureMove().

## prologueDrop()

template<osl::Player P>

template void osl::NumEffectState::prologueDrop | ( | Player2Type< P > | ,
|  | Square | to,
|  | Ptype | ptype,
|  | Piece & | oldPiece,
|  | int & | num,
|  | PtypeO & | ptypeO,
|  | int & | numIndex,
|  | mask_t & | numMask,
|  | CArray< PieceMask, 2 > & | pin_or_open_backup,
|  | KingMobility & | king_mobility_backup,
|  | CArray< PieceMask, 2 > & | effected_mask_backup,
|  | CArray< PieceMask, 2 > & | effected_changed_mask_backup,
|  | CArray< uint64_t, 2 > & | king8infos_backup,
|  | MobilityTable & | mobility_backup )

private

Definition at line 430 of file numEffectState.cc.

References osl::alt(), osl::misc::GeneralMask< Integer >::any(), osl::container::BoardMask::anyInRange(), osl::BLACK, osl::Board_Mask_Table3x3, osl::misc::GeneralMask< Integer >::bsf(), changedEffects(), effects, hasEffectAt(), king8infos, king_mobility, osl::SimpleState::kingSquare(), osl::misc::GeneralMask< Integer >::lowestBit(), makeKing8Info(), osl::SimpleState::pieceOf(), pieces_onboard, pin_or_open, osl::PTYPE_BASIC_MIN, osl::Ptype_Table, osl::Piece::ptypeO(), recalcPinOpen(), osl::container::BoardMask::set(), osl::SimpleState::setBoard(), osl::SimpleState::setPieceOf(), osl::Square::STAND(), osl::SimpleState::stand_count, osl::SimpleState::standMask(), osl::UL, and osl::WHITE.

Referenced by doDropMove(), and doUndoDropMove().

## prologueSimple()

template<osl::Player P>

template void osl::NumEffectState::prologueSimple | ( | Player2Type< P > | ,
|  | Square | from,
|  | Square | to,
|  | int | promoteMask,
|  | Piece & | oldPiece,
|  | int & | num,
|  | PtypeO & | oldPtypeO,
|  | PtypeO & | new_ptypeo,
|  | CArray< PieceMask, 2 > & | pin_or_open_backup,
|  | KingMobility & | king_mobility_backup,
|  | PieceMask & | promoted_backup,
|  | CArray< PieceMask, 2 > & | effected_mask_backup,
|  | CArray< PieceMask, 2 > & | effected_changed_mask_backup,
|  | CArray< uint64_t, 2 > & | king8infos_backup,
|  | MobilityTable & | mobility_backup )

private

Definition at line 320 of file numEffectState.cc.

References osl::alt(), osl::container::BoardMask::anyInRange(), osl::BLACK, osl::Board_Mask_Table3x3, changedEffects(), effects, osl::Piece::EMPTY(), hasEffectAt(), osl::KING, king8infos, king_mobility, osl::SimpleState::kingSquare(), makeKing8Info(), makePinOpen(), osl::newPtypeO(), osl::Piece::number(), osl::SimpleState::pieceAt(), pin_or_open, promoted, osl::Piece::promoteWithMask(), osl::Piece::ptypeO(), recalcPinOpen(), osl::container::BoardMask::set(), osl::SimpleState::setBoard(), osl::SimpleState::setPieceOf(), osl::UL, and osl::WHITE.

Referenced by doSimpleMove(), and doUndoSimpleMove().

## promotedPieces()

const PieceMask osl::NumEffectState::promotedPieces | ( |  | ) | const

inline

Definition at line 64 of file numEffectState.h.

References promoted.

Referenced by osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::PromotedMinorPieces::eval(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25EffectCountCombination::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), findThreatenedPiece(), osl::effect_util::AdditionalEffect::hasEffect(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::ki2::show(), osl::progress::ml::NewProgress::updateAttack5x5Pieces(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), osl::progress::ml::NewProgress::updatePawnFacing(), and osl::eval::ml::OpenMidEndingEval::updateSub().

## recalcPinOpen()

void osl::NumEffectState::recalcPinOpen | ( | Square | changed,
|  | Direction & | lastDir,
|  | Player | defense )

inline private

Definition at line 998 of file numEffectState.h.

References osl::alt(), osl::BLACK, osl::Board_Table, osl::Piece::isEdgeNum(), osl::Piece::isEmptyNum(), osl::isLong(), osl::Piece::isPieceNum(), osl::Square::isPieceStand(), king_mobility, osl::SimpleState::kingSquare(), longEffectNumTable(), osl::longToShort(), osl::Square::makeDirect(), osl::Piece::number(), osl::SimpleState::pieceAt(), piecesOnBoard(), pin_or_open, osl::Square::uintValue(), and osl::UL.

Referenced by prologueCapture(), prologueDrop(), and prologueSimple().

## safeCaptureNotByKing() [1/2]

Piece osl::NumEffectState::safeCaptureNotByKing | ( | Player | P,
|  | Square | target ) const

inline

Definition at line 875 of file numEffectState.h.

References osl::BLACK, osl::SimpleState::kingPiece(), and safeCaptureNotByKing().

## safeCaptureNotByKing() [2/2]

template<Player P>

Piece osl::NumEffectState::safeCaptureNotByKing | ( | Square | target,
|  | Piece | king ) const

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

Parameters

  king | 玉 (玉で取る手は考えない)

Returns
  移動可能な駒があれば，安全な駒を一つ．なければ Piece::EMPTY()

See also
  osl::move_classifier::PawnDropCheckmate

Referenced by osl::move_classifier::PawnDropCheckmate< P >::isMember(), and safeCaptureNotByKing().

## selectCheapPiece()

const osl::Piece osl::NumEffectState::selectCheapPiece | ( | PieceMask | effect | ) | const

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

Definition at line 99 of file numEffectState.cc.

References osl::misc::GeneralMask< Integer >::bsf(), osl::Piece::EMPTY(), osl::KING, osl::LANCE, osl::PAWN, osl::Piece_Table, osl::SimpleState::pieceOf(), osl::SimpleState::pieces, and promoted.

Referenced by osl::move_probability::ToEffect::find(), findCheapAttack(), and findCheapAttackNotBy().

## showEffect()

void osl::NumEffectState::showEffect | ( | std::ostream & | os | ) | const

Definition at line 858 of file numEffectState.cc.

References osl::BLACK, effectSetAt(), osl::Piece_Table, osl::SimpleState::pieceAt(), osl::csa::show(), osl::Piece::SIZE, osl::SimpleState::standMask(), and osl::WHITE.

## wasCheckEvasion()

bool osl::NumEffectState::wasCheckEvasion | ( | Move | last_move | ) | const

Definition at line 174 of file numEffectState.cc.

References osl::alt(), osl::Board_Table, osl::Move::capturePtypeO(), osl::Move::from(), hasEffectAt(), hasEffectIf(), osl::Move::isCapture(), osl::Move::isDrop(), osl::Move::isNormal(), osl::KING, osl::SimpleState::kingSquare(), osl::KNIGHT, osl::Piece::number(), osl::Move::oldPtype(), osl::Piece::owner(), osl::SimpleState::pieceOnBoard(), pin(), pinnedDir(), osl::primDir(), osl::primDirUnsafe(), osl::Move::ptype(), osl::Move::to(), and osl::SimpleState::turn().

## Friends And Related Symbol Documentation

## operator==

bool operator== | ( | const NumEffectState & | st1,
|  | const NumEffectState & | st2 )

friend

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

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

References NumEffectState().

## Member Data Documentation

## effects

effect::NumSimpleEffectTable osl::NumEffectState::effects

private

Definition at line 35 of file numEffectState.h.

Referenced by changedEffects(), changedPieces(), copyFrom(), effectedChanged(), effectedMask(), effectSetAt(), epilogueCapture(), epilogueDrop(), epilogueSimple(), findLongAttackAt(), hasChangedEffects(), isConsistent(), longEffectNumTable(), makeMovePass(), mobilityOf(), NumEffectState(), osl::operator==(), prologueCapture(), prologueDrop(), and prologueSimple().

## king8infos

CArray<uint64_t,2> osl::NumEffectState::king8infos

private

Definition at line 41 of file numEffectState.h.

Referenced by copyFrom(), epilogueCapture(), epilogueDrop(), epilogueSimple(), Iking8Info(), makeKing8Info(), osl::operator==(), prologueCapture(), prologueDrop(), and prologueSimple().

## king_mobility

KingMobility osl::NumEffectState::king_mobility

private

Definition at line 40 of file numEffectState.h.

Referenced by copyFrom(), epilogueCapture(), epilogueDrop(), epilogueSimple(), kingMobilityAbs(), makePinOpenDir(), osl::operator==(), prologueCapture(), prologueDrop(), prologueSimple(), and recalcPinOpen().

## pieces_onboard

CArray<PieceMask,2> osl::NumEffectState::pieces_onboard

private

Definition at line 36 of file numEffectState.h.

Referenced by copyFrom(), epilogueCapture(), epilogueDrop(), hasEffectInDirection(), hasEffectNotBy(), NumEffectState(), osl::operator==(), piecesOnBoard(), prologueCapture(), and prologueDrop().

## pin_or_open

CArray<PieceMask,2> osl::NumEffectState::pin_or_open

private

Definition at line 39 of file numEffectState.h.

Referenced by checkShadow(), copyFrom(), epilogueCapture(), epilogueDrop(), epilogueSimple(), makePinOpen(), osl::operator==(), pin(), pinOrOpen(), prologueCapture(), prologueDrop(), prologueSimple(), and recalcPinOpen().

## promoted

PieceMask osl::NumEffectState::promoted

private

成駒一覧

Definition at line 38 of file numEffectState.h.

Referenced by copyFrom(), epilogueCapture(), epilogueSimple(), findAttackAtStrict(), findThreatenedPiece(), forEachOnBoardPtypeStrict(), hasEffectByPtypeStrict(), isConsistent(), NumEffectState(), osl::operator==(), prologueCapture(), prologueSimple(), promotedPieces(), and selectCheapPiece().

The documentation for this class was generated from the following files:

- numEffectState.h
- numEffectState.cc