利きを持つ局面
#include <numEffectState.h>
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 ¬Mask) 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.h の 33 行で定義されています。
typedef NumEffectState osl::state::NumEffectState::state_t [private] |
osl::state::SimpleStateを再定義しています。
numEffectState.h の 47 行で定義されています。
osl::state::NumEffectState::NumEffectState | ( | const state::SimpleState & | st = SimpleState(HIRATE) |
) | [explicit] |
numEffectState.cc の 46 行で定義されています。
参照先 osl::BLACK, osl::effect::NumSimpleEffectTable::effected_changed_mask, osl::effect::NumSimpleEffectTable::effected_mask, effects, osl::state::SimpleState::getPieceOf(), hasEffectBy(), osl::indexToPlayer(), osl::state::SimpleState::isOnBoard(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), makePinOpen(), mutableOnBoardMask(), onBoardMask, osl::Piece::owner(), osl::Piece::position(), promoted, と osl::WHITE.
osl::state::NumEffectState::~NumEffectState | ( | ) |
numEffectState.cc の 80 行で定義されています。
bool osl::state::NumEffectState::anyEffectChanged | ( | ) | const [inline] |
numEffectState.h の 195 行で定義されています。
参照先 changedPieces().
const BoardMask osl::state::NumEffectState::changedEffects | ( | ) | const [inline] |
const BoardMask osl::state::NumEffectState::changedEffects | ( | Player | pl | ) | const [inline] |
const NumBitmapEffect osl::state::NumEffectState::changedPieces | ( | ) | const [inline] |
numEffectState.h の 188 行で定義されています。
参照先 osl::effect::NumSimpleEffectTable::changedPieces(), と effects.
参照元 anyEffectChanged(), isConsistent(), と longEffectChanged().
int osl::state::NumEffectState::countEffect | ( | Player | player, | |
Position | target, | |||
PieceMask | pins | |||
) | const [inline] |
利きの数を数える.
targetが盤をはみ出してはいけない
numEffectState.h の 434 行で定義されています。
参照先 getEffect(), と osl::Position::isOnBoard().
参照元 osl::eval::ml::King25Effect::countEffectAndPieces(), と osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth().
osl::state::SimpleStateを再定義しています。
numEffectState.cc の 227 行で定義されています。
参照先 osl::BLACK, osl::state::SimpleState::getTurn(), osl::PAWN, と osl::state::SimpleState::setPawn().
const osl::mask_t osl::state::NumEffectState::effectBit | ( | Player | P, | |
Ptype | ptype, | |||
Position | target | |||
) | const |
numEffectState.cc の 561 行で定義されています。
参照先 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, と osl::SILVER.
const mask_t osl::state::NumEffectState::effectBit | ( | Player | P, | |
Position | target | |||
) | const [inline] |
numEffectState.h の 161 行で定義されています。
参照先 getEffect(), と getOnBoardMask().
const PieceMask osl::state::NumEffectState::effectedChanged | ( | Player | pl | ) | const [inline] |
前の指手でeffectedMask(pl)が変化したか.
取られた駒は現在の実装ではリストされないようだ.
numEffectState.h の 754 行で定義されています。
参照先 osl::effect::NumSimpleEffectTable::effected_changed_mask, と effects.
参照元 isConsistent().
const PieceMask osl::state::NumEffectState::effectedMask | ( | Player | pl | ) | const [inline] |
pl からの利きが(1つ以上)ある駒一覧
numEffectState.h の 747 行で定義されています。
参照先 osl::effect::NumSimpleEffectTable::effected_mask, と effects.
参照元 osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), findThreatenedPiece(), と isConsistent().
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.h の 410 行で定義されています。
参照先 osl::Piece::EMPTY(), と osl::state::SimpleState::getPieceOf().
const Piece osl::state::NumEffectState::effectPtypeStrict | ( | Player | attack, | |
Position | target | |||
) | const [inline] |
numEffectState.h の 418 行で定義されています。
参照先 osl::Piece::EMPTY(), osl::state::SimpleState::getPieceOf(), osl::isPromoted(), と promoted.
const Piece osl::state::NumEffectState::findCheapThreat | ( | Player | P, | |
Position | square | |||
) | const [inline] |
P | - 利きをつけている側のプレイヤ | |
square | - 調査する場所 |
numEffectState.h の 602 行で定義されています。
const Piece osl::state::NumEffectState::findCheapThreatNotBy | ( | Player | P, | |
Position | square, | |||
const PieceMask & | ignore | |||
) | const [inline] |
P | - 利きをつけている側のプレイヤ | |
square | - 調査する場所 |
numEffectState.h の 611 行で定義されています。
参照先 getEffect(), getOnBoardMask(), osl::state::SimpleState::pieces, と selectCheapPiece().
bool osl::state::NumEffectState::findCheckPiece | ( | Piece & | attack_piece | ) | const [inline] |
王手駒を探す
attack_piece | 一つの駒による王手の場合はattck_pieceにその駒を入れる 複数の駒による王手の場合はPieceEMPTY()を入れる | |
P(template) | 玉 |
numEffectState.h の 651 行で定義されています。
const osl::Piece osl::state::NumEffectState::findThreatenedPiece | ( | Player | P | ) | const |
取られそうなPの駒で価値が最大のもの
numEffectState.cc の 126 行で定義されています。
参照先 osl::alt(), effectedMask(), osl::Piece::EMPTY(), osl::PtypeTable::getMaskLow(), getOnBoardMask(), osl::state::SimpleState::getPieceOf(), osl::PieceTable::getPtypeOf(), inCheck(), osl::PtypeTraits< KNIGHT >::indexMin, osl::LANCE, osl::eval::max(), osl::PAWN, osl::Piece_Table, osl::state::SimpleState::pieces, promoted, promotedPieces(), と osl::Ptype_Table.
void osl::state::NumEffectState::forEachEffect | ( | Position | pos, | |
Action & | action, | |||
const PieceMask & | pin | |||
) | const [inline] |
pos にある駒を取る move を生成して action の member を呼び出す.
pin | 無視する駒 | |
action | たとえば AlwaysMoveAction |
numEffectState.h の 509 行で定義されています。
参照先 getEffect(), と getOnBoardMask().
void osl::state::NumEffectState::forEachEffect | ( | Position | pos, | |
Action & | action | |||
) | const [inline] |
pos への利きを持つ各駒に関して処理を行う.
action | たとえば AlwaysMoveAction |
numEffectState.h の 498 行で定義されています。
参照先 getEffect(), と getOnBoardMask().
void osl::state::NumEffectState::forEachEffect | ( | const PieceMask & | pieces, | |
Position | pos, | |||
Action & | action | |||
) | const [inline, private] |
numEffectState.h の 468 行で定義されています。
void osl::state::NumEffectState::forEachEffectNotBy | ( | Position | pos, | |
Piece | piece, | |||
Action & | action | |||
) | const [inline] |
pos に移動する move を生成して action の member を呼び出す
action | たとえば AlwayMoveAction | |
piece | これ以外の駒を使う |
numEffectState.h の 522 行で定義されています。
参照先 getEffect(), getOnBoardMask(), osl::Piece::number(), と osl::state::SimpleState::pieces.
void osl::state::NumEffectState::forEachEffectOfPiece | ( | Position | piecePosition, | |
Action & | action | |||
) | const [inline] |
numEffectState.h の 1094 行で定義されています。
void osl::state::NumEffectState::forEachEffectOfPiece | ( | Piece | piece, | |
Action & | action | |||
) | const [inline] |
void osl::state::NumEffectState::forEachEffectOfPiece | ( | Piece | piece, | |
Action & | action | |||
) | const [inline] |
void osl::state::NumEffectState::forEachEffectOfPiece | ( | Position | piecePosition, | |
Action & | action | |||
) | const [inline] |
piecePositionにある駒によって利きを受けるすべてのposition (空白含む)について actionを実行する
SimpleState より移植: ImmediateAddSupportがなければ消せる
void osl::state::NumEffectState::forEachEffectOfPieceDir | ( | Position | piecePosition, | |
Action & | action | |||
) | const [inline, private] |
numEffectState.h の 679 行で定義されています。
void osl::state::NumEffectState::forEachEffectOfPieceDir | ( | Position | piecePosition, | |
Action & | action, | |||
Int2Type< true > | ||||
) | const [inline, private] |
numEffectState.h の 673 行で定義されています。
void osl::state::NumEffectState::forEachEffectOfPieceDir | ( | Position | , | |
Action & | , | |||
Int2Type< false > | ||||
) | const [inline, private] |
numEffectState.h の 671 行で定義されています。
void osl::state::NumEffectState::forEachEffectOfPieceLongDir | ( | Position | piecePosition, | |
Action & | action | |||
) | const [inline, private] |
numEffectState.h の 696 行で定義されています。
void osl::state::NumEffectState::forEachEffectOfPieceLongDir | ( | Position | piecePosition, | |
Action & | action, | |||
Int2Type< true > | ||||
) | const [inline, private] |
numEffectState.h の 685 行で定義されています。
参照先 osl::state::SimpleState::getPieceAt(), osl::Offset::intValue(), と osl::Piece::isEmpty().
void osl::state::NumEffectState::forEachEffectOfPieceLongDir | ( | Position | , | |
Action & | , | |||
Int2Type< false > | ||||
) | const [inline, private] |
numEffectState.h の 683 行で定義されています。
void osl::state::NumEffectState::forEachEffectPtype | ( | Position | pos, | |
Action & | action | |||
) | const [inline] |
void osl::state::NumEffectState::forEachOnBoard | ( | F & | func | ) | const [inline] |
T は isBasic でなくても動くが unpromote(T) の結果と同じ.
numEffectState.h の 71 行で定義されています。
参照先 getOnBoardMask(), と osl::state::SimpleState::getPieceOf().
void osl::state::NumEffectState::forEachOnBoardPtypeStrict | ( | F & | func | ) | const [inline] |
T の成不成を区別.
numEffectState.h の 83 行で定義されています。
参照先 getOnBoardMask(), osl::state::SimpleState::getPieceOf(), osl::isPromoted(), と promoted.
NumBitmapEffect osl::state::NumEffectState::getEffect | ( | Position | pos | ) | const [inline] |
numEffectState.h の 100 行で定義されています。
参照先 effects, と osl::effect::NumSimpleEffectTable::getEffect().
参照元 countEffect(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), effectBit(), findCheapThreat(), findCheapThreatNotBy(), findThreatNotBy(), forEachEffect(), forEachEffectNotBy(), hasEffectBy(), hasEffectByNotPinned(), hasEffectByPiece(), hasEffectDir(), hasEffectLong(), hasEffectNotBy(), hasEffectNotMask(), hasMultipleEffectBy(), isConsistent(), selectLong(), と showEffect().
const PieceMask& osl::state::NumEffectState::getOnBoardMask | ( | Player | p | ) | const [inline] |
numEffectState.h の 59 行で定義されています。
参照先 onBoardMask.
参照元 osl::eval::ml::King25Effect::countEffectAndPieces(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), effectBit(), findCheapThreat(), findCheapThreatNotBy(), findThreatenedPiece(), findThreatNotBy(), forEachEffect(), forEachEffectNotBy(), forEachOnBoard(), forEachOnBoardPtypeStrict(), hasEffectBy(), hasEffectByNotPinned(), hasEffectDir(), hasEffectLong(), hasEffectNotBy(), hasEffectNotMask(), isConsistent(), isOnBoardNum(), makePinOpen(), pin(), recalcPinOpen(), と selectLong().
bool osl::state::NumEffectState::hasEffectBy | ( | Position | target, | |
Piece & | attackerPiece | |||
) | const [inline] |
P(template) | - 利きをつけている側のプレイヤ | |
target | - 利きをつけられた場所 | |
attackerPiece | - multiple attackの場合はPieceEMPTY() そうでないなら利きをつけている駒を返す |
numEffectState.h の 555 行で定義されています。
参照先 osl::Piece::EMPTY(), getEffect(), getOnBoardMask(), と osl::state::SimpleState::getPieceOf().
bool osl::state::NumEffectState::hasEffectBy | ( | Player | P, | |
Position | target, | |||
Piece & | attackerPiece | |||
) | const [inline] |
numEffectState.h の 541 行で定義されています。
参照先 osl::BLACK.
bool osl::state::NumEffectState::hasEffectBy | ( | Position | target | ) | const [inline] |
対象とするマスにあるプレイヤーの利きがあるかどうか.
player | 攻撃側 | |
target | 対象のマス |
numEffectState.h の 323 行で定義されています。
参照先 getEffect(), と osl::Position::isOnBoard().
参照元 osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), hasEffectByWithRemove(), inCheck(), main(), と NumEffectState().
bool osl::state::NumEffectState::hasEffectByNotPinned | ( | Position | target | ) | const [inline] |
pinされている駒以外からの利きがない
numEffectState.h の 333 行で定義されています。
参照先 osl::alt(), getEffect(), getOnBoardMask(), osl::Position::isOnBoard(), と pinOrOpen().
駒attack が target に利きを持つか (旧hasEffectToと統合)
target | 対象のマス |
numEffectState.h の 380 行で定義されています。
参照先 getEffect(), osl::Position::isOnBoard(), osl::Piece::isPiece(), と osl::Piece::number().
参照元 isAlmostValidMove().
bool osl::state::NumEffectState::hasEffectByPtype | ( | Player | attack, | |
Position | target | |||
) | const [inline] |
target に ptype の利きがあるか? 成不成を区別しない
numEffectState.h の 391 行で定義されています。
bool osl::state::NumEffectState::hasEffectByPtypeStrict | ( | Player | attack, | |
Position | target | |||
) | const [inline] |
target に ptype の利きがあるか? 成不成を区別
numEffectState.h の 399 行で定義されています。
参照先 osl::isPromoted(), と promoted.
bool osl::state::NumEffectState::hasEffectByWithRemove | ( | Position | target, | |
Position | removed | |||
) | const [inline] |
numEffectState.tcc の 12 行で定義されています。
参照先 osl::BLACK, osl::Board_Table, osl::BoardTable::getLongDirection(), osl::state::SimpleState::getPieceAt(), osl::state::SimpleState::getPieceOf(), hasEffectBy(), hasEffectNotBy(), osl::Piece::isEmptyNum(), osl::isLong(), osl::Piece::isPiece(), longEffectNumTable(), osl::longToShort(), osl::Piece::number(), osl::Piece::owner(), と selectLong().
bool osl::state::NumEffectState::hasEffectByWithRemove | ( | Player | player, | |
Position | target, | |||
Position | removed | |||
) | const [inline] |
numEffectState.h の 737 行で定義されています。
参照先 osl::BLACK.
bool osl::state::NumEffectState::hasEffectByWithRemove | ( | Position | target, | |
Position | removed | |||
) | const [inline] |
bool osl::state::NumEffectState::hasEffectDir | ( | Position | to | ) | const [inline] |
あるマスにあるDirectionでの長い利きがあるかどうか.
64bit版対応済み
numEffectState.h の 278 行で定義されています。
参照先 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.h の 719 行で定義されています。
参照先 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().
bool osl::state::NumEffectState::hasEffectLong | ( | Player | P, | |
Position | to | |||
) | const [inline] |
あるマスにPTYPEの長い利きがあるかどうか.
numEffectState.h の 308 行で定義されています。
参照先 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.h の 345 行で定義されています。
参照先 getEffect(), getOnBoardMask(), osl::Piece::number(), onBoardMask, と osl::Piece::owner().
bool osl::state::NumEffectState::hasEffectNotMask | ( | Player | player, | |
Position | target, | |||
PieceMask const & | notMask | |||
) | const [inline] |
対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.
指定した駒の利きがあることが前提.
player | 攻撃側 | |
piece | 攻撃側の駒 | |
target | 対象のマス |
numEffectState.h の 359 行で定義されています。
参照先 getEffect(), getOnBoardMask(), と onBoardMask.
bool osl::state::NumEffectState::hasMultipleEffectBy | ( | Player | player, | |
Position | target | |||
) | const [inline] |
二つ以上の駒から利きがある.
そもそも利きがない場合も呼ばれる
player | 攻撃側 | |
target | 対象のマス |
numEffectState.h の 369 行で定義されています。
参照先 getEffect().
uint64_t osl::state::NumEffectState::Iking8Info | ( | Player | king | ) | const [inline] |
numEffectState.h の 207 行で定義されています。
参照先 king8infos.
参照元 osl::eval::ml::King8EffectAll::eval(), isConsistent(), と king8Info().
bool osl::state::NumEffectState::inCheck | ( | ) | const [inline] |
手番の玉が王手状態
numEffectState.h の 641 行で定義されています。
参照先 osl::state::SimpleState::getTurn(), と inCheck().
参照元 findThreatenedPiece(), と inCheck().
bool osl::state::NumEffectState::inCheck | ( | Player | P | ) | const [inline] |
Pの玉が王手状態.
numEffectState.h の 631 行で定義されています。
参照先 osl::alt(), osl::state::SimpleState::getKingPosition(), hasEffectBy(), と osl::Position::isPieceStand().
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), と osl::ntesuki::NtesukiSimulationSearcher::defenseForProof().
bool osl::state::NumEffectState::isAlmostValidMove | ( | Move | move, | |
bool | showError = true | |||
) | const |
合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
局面に依存する検査でも,玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.
osl::state::SimpleStateを再定義しています。
numEffectState.cc の 501 行で定義されています。
bool osl::state::NumEffectState::isAlmostValidMove | ( | Move | move | ) | const [inline] |
合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
Pをtemplate引数にできると少しは速くなりそう 局面に依存する検査でも,玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.
showError(template) | - falseを返す時には何か表示する. | |
move | - 手 |
osl::state::SimpleStateを再定義しています。
numEffectState.cc の 417 行で定義されています。
参照先 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 |
局面更新に関する一貫性をテスト
numEffectState.cc の 325 行で定義されています。
参照先 osl::BLACK, changedEffects(), changedPieces(), effectedChanged(), effectedMask(), getEffect(), getOnBoardMask(), osl::state::SimpleState::getPieceOf(), osl::indexToPlayer(), osl::Piece::position(), osl::Piece::SIZE, osl::Move::to(), と osl::WHITE.
bool osl::state::NumEffectState::isConsistent | ( | bool | showError = true |
) | const |
osl::state::SimpleStateを再定義しています。
numEffectState.cc の 256 行で定義されています。
参照先 osl::alt(), osl::effect::NumSimpleEffectTable::effectedNumTable, effects, osl::effect::NumSimpleEffectTable::getEffect(), osl::state::SimpleState::getKingPosition(), osl::state::SimpleState::getPieceOf(), Iking8Info(), osl::indexToPlayer(), osl::state::SimpleState::isConsistent(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::effect_util::Pin::make(), pin(), promoted, と osl::Piece::SIZE.
参照元 osl::state::HistoryState::HistoryState(), と osl::state::operator==().
bool osl::state::NumEffectState::isOnBoardNum | ( | int | num | ) | const [inline] |
numEffectState.h の 62 行で定義されています。
参照先 osl::BLACK, getOnBoardMask(), と osl::WHITE.
const osl::checkmate::King8Info osl::state::NumEffectState::king8Info | ( | Player | king | ) | const |
numEffectState.cc の 29 行で定義されています。
参照先 Iking8Info().
numEffectState.h の 112 行で定義されています。
玉がd方向にどこまで動けるかを返す
p | 注目する玉のプレイヤ | |
d | piece からみた向き |
numEffectState.h の 121 行で定義されています。
参照先 osl::BLACK, osl::inverse(), と kingMobilityAbs().
bool osl::state::NumEffectState::longEffectChanged | ( | ) | const [inline] |
numEffectState.h の 191 行で定義されています。
参照先 changedPieces().
const EffectedNumTable& osl::state::NumEffectState::longEffectNumTable | ( | ) | const [inline] |
numEffectState.h の 127 行で定義されています。
参照先 osl::effect::NumSimpleEffectTable::effectedNumTable, と effects.
参照元 hasEffectByWithRemove(), makePinOpenDir(), と recalcPinOpen().
const Piece osl::state::NumEffectState::longEffectOfDirection | ( | Position | square, | |
Direction | d | |||
) | const [inline] |
numEffectState.h の 156 行で定義されています。
参照先 osl::state::SimpleState::getPieceOnBoard(), と longEffectOfDirection().
const Piece osl::state::NumEffectState::longEffectOfDirection | ( | Piece | piece, | |
Direction | d | |||
) | const [inline] |
numEffectState.h の 151 行で定義されています。
参照先 osl::Piece::isPiece(), longEffectOfDirection(), と osl::Piece::owner().
const Piece osl::state::NumEffectState::longEffectOfDirection | ( | Player | owner, | |
Piece | piece, | |||
Direction | d | |||
) | const [inline] |
numEffectState.h の 145 行で定義されています。
参照先 osl::Piece::isPiece(), longEffectOfDirection(), osl::Piece::number(), と osl::Piece::owner().
const Piece osl::state::NumEffectState::longEffectOfDirection | ( | Player | owner, | |
int | piece, | |||
Direction | d | |||
) | const [inline] |
pieceのd方向から長い利きがある場合にその駒を返す。
d | piece からみた向き |
numEffectState.h の 135 行で定義されています。
参照先 osl::BLACK, osl::effect::NumSimpleEffectTable::effectedNumTable, effects, osl::Piece::EMPTY(), osl::EMPTY_NUM, osl::state::SimpleState::getPieceOf(), と osl::inverse().
void osl::state::NumEffectState::makeKing8Info | ( | ) | [inline] |
numEffectState.cc の 35 行で定義されています。
参照先 king8infos.
void osl::state::NumEffectState::makeMovePass | ( | ) | [inline] |
void osl::state::NumEffectState::makePinOpen | ( | osl::Player | defense | ) |
numEffectState.cc の 555 行で定義されています。
参照先 osl::state::SimpleState::getKingPosition(), makePinOpen(), と pin_or_open.
osl::container::PieceMask osl::state::NumEffectState::makePinOpen | ( | osl::Position | target, | |
osl::Player | defense | |||
) | [private] |
numEffectState.cc の 538 行で定義されています。
参照先 osl::alt(), getOnBoardMask(), と osl::Position::isPieceStand().
参照元 makePinOpen(), と NumEffectState().
PieceMask& osl::state::NumEffectState::mutableOnBoardMask | ( | Player | p | ) | [inline, private] |
PieceMask osl::state::NumEffectState::pin | ( | Player | king | ) | const [inline] |
bool osl::state::NumEffectState::pinnedCanMoveTo | ( | Piece | p, | |
Position | to | |||
) | const [inline] |
pinされた駒pがtoに動けるか? pinに関係がなければtoへ動けるという前提
numEffectState.h の 780 行で定義されています。
参照先 osl::Board_Table, osl::BoardTable::getShort8Unsafe(), hasEffectFromTo(), osl::Piece::position(), osl::primDir(), osl::primDirUnsafe(), と osl::Piece::ptypeO().
pinされた駒がPのKingから見てどの方向か? Pから見たdirectionを返す
numEffectState.h の 769 行で定義されています。
参照先 osl::Board_Table, osl::BoardTable::getShort8(), osl::Piece::number(), pinOrOpen(), と osl::Piece::position().
PieceMask osl::state::NumEffectState::pinOrOpen | ( | Player | king | ) | const [inline] |
const PieceMask osl::state::NumEffectState::promotedPieces | ( | ) | const [inline] |
void osl::state::NumEffectState::recalcPinOpen | ( | Position | changed, | |
Direction & | lastDir, | |||
Player | defense | |||
) | [inline, private] |
numEffectState.h の 230 行で定義されています。
参照先 osl::alt(), osl::BLACK, osl::Board_Table, osl::state::SimpleState::getKingPosition(), osl::BoardTable::getLongDirection(), osl::BoardTable::getOffsetForBlack(), getOnBoardMask(), osl::state::SimpleState::getPieceAt(), osl::Piece::isEdgeNum(), osl::Piece::isEmptyNum(), osl::isLong(), osl::Piece::isPieceNum(), osl::Position::isPieceStand(), king_mobility, longEffectNumTable(), osl::longToShort(), osl::Position::makeDirect(), osl::Piece::number(), pin_or_open, target, osl::Position::uintValue(), と osl::UL.
const osl::Piece osl::state::NumEffectState::selectCheapPiece | ( | PieceMask | effect | ) | const |
利きの中から安そうな駒を選ぶ
numEffectState.cc の 85 行で定義されています。
参照先 osl::Piece::EMPTY(), osl::state::SimpleState::getPieceOf(), osl::KING, osl::LANCE, osl::eval::min(), osl::PAWN, osl::state::SimpleState::pieces, と promoted.
const mask_t osl::state::NumEffectState::selectLong | ( | Position | target, | |
Player | owner | |||
) | const [inline] |
numEffectState.h の 174 行で定義されています。
参照先 getEffect(), getOnBoardMask(), と selectLong().
const mask_t osl::state::NumEffectState::selectLong | ( | Position | target, | |
Player | owner | |||
) | const [inline] |
numEffectState.h の 170 行で定義されています。
参照先 getOnBoardMask().
const mask_t osl::state::NumEffectState::selectLong | ( | Position | target | ) | const [inline] |
void osl::state::NumEffectState::showEffect | ( | std::ostream & | os | ) | const |
friend class apply_move::ApplyDoUndoCaptureMove< BLACK, NumEffectState > [friend] |
numEffectState.h の 49 行で定義されています。
friend class apply_move::ApplyDoUndoCaptureMove< WHITE, NumEffectState > [friend] |
numEffectState.h の 52 行で定義されています。
friend class apply_move::ApplyDoUndoDropMove< BLACK, NumEffectState > [friend] |
numEffectState.h の 50 行で定義されています。
friend class apply_move::ApplyDoUndoDropMove< WHITE, NumEffectState > [friend] |
numEffectState.h の 53 行で定義されています。
friend class apply_move::ApplyDoUndoSimpleMove< BLACK, NumEffectState > [friend] |
numEffectState.h の 48 行で定義されています。
friend class apply_move::ApplyDoUndoSimpleMove< WHITE, NumEffectState > [friend] |
numEffectState.h の 51 行で定義されています。
bool operator== | ( | const NumEffectState & | st1, | |
const NumEffectState & | st2 | |||
) | [friend] |
駒番に依存した局面(インスタンス)比較をする.
なお、駒番に非依存な局面比較をしたい場合は、oslrecord::CompactBoardや osl::hash::HashKeyを用いる.
friend class osl::misc::FastCopier [friend] |
osl::state::SimpleStateを再定義しています。
numEffectState.h の 54 行で定義されています。
CArray<uint64_t,2> osl::state::NumEffectState::king8infos [private] |
numEffectState.h の 44 行で定義されています。
参照元 Iking8Info(), と makeKing8Info().
KingMobility osl::state::NumEffectState::king_mobility [private] |
numEffectState.h の 43 行で定義されています。
参照元 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.h の 42 行で定義されています。
参照元 makePinOpen(), osl::state::operator==(), pin(), pinOrOpen(), と recalcPinOpen().
PieceMask osl::state::NumEffectState::promoted [private] |