#include <ntesukiMove.h>
Public メソッド | |
NtesukiMove () | |
NtesukiMove (osl::Move m) | |
NtesukiMove (osl::Move m, Flags f) | |
NtesukiMove (const NtesukiMove &) | |
~NtesukiMove () | |
NtesukiMove | operator= (const NtesukiMove &) |
void | setCheck () |
bool | isCheck () const |
void | setOrder (int o) |
int | getOrder () const |
void | setInterpose () |
bool | isInterpose () const |
void | setLameLong () |
bool | isLameLong () const |
void | setBySimulation () |
bool | isBySimulation () const |
void | setNoPromote () |
bool | isNoPromote () const |
void | setToOld () |
bool | isToOld () const |
template<Player P> | |
void | setImmediateCheckmate () |
bool | isImmediateCheckmate () const |
template<Player P> | |
void | setCheckmateSuccess (int pass_left) |
template<Player P> | |
bool | isCheckmateSuccess (int pass_left) const |
bool | isCheckmateSuccessSlow (Player P, int pass_left) const |
template<Player P> | |
void | setCheckmateFail (int pass_left) |
template<Player P> | |
bool | isCheckmateFail (int pass_left) const |
bool | isCheckmateFailSlow (Player P, int pass_left) const |
void | setPawnDropCheckmate () |
bool | isPawnDropCheckmate () const |
void | setHEstimates (unsigned short p_a, unsigned short d_a, unsigned short p_d, unsigned short d_d) |
void | setCEstimates (unsigned short p, unsigned short d) |
bool | isValid () const |
bool | isInvalid () const |
bool | isNormal () const |
bool | isPass () const |
bool | isDrop () const |
Position | to () const |
Ptype | ptype () const |
Move | getMove () const |
bool | operator== (const NtesukiMove &rhs) const |
bool | operator!= (const NtesukiMove &rhs) const |
void | flagsToStream (std::ostream &os) const |
Static Public メソッド | |
static NtesukiMove | INVALID () |
Public 変数 | |
unsigned short | h_a_proof |
unsigned short | h_a_disproof |
unsigned short | h_d_proof |
unsigned short | h_d_disproof |
Private 型 | |
enum | Flags { NONE = 0, CHECK_FLAG = 1, PAWN_DROP_CHECKMATE_FLAG = 2, IMMEDIATE_CHECKMATE = 8, TO_OLDER_CHILD = 16, NOPROMOTE = 32, INTERPOSE = 64, ATTACK_FLAG = 128, BY_SIMULATION = 256, LAME_LONG = 512, WHITE_SHIFT = 4, IS_SUCCESS_SHIFT = 16, IS_SUCCESS_BLACK_SHIFT = IS_SUCCESS_SHIFT, IS_SUCCESS_WHITE_SHIFT = IS_SUCCESS_SHIFT + WHITE_SHIFT, IS_SUCCESS_BLACK_BASE = 1 << IS_SUCCESS_BLACK_SHIFT, IS_SUCCESS_WHITE_BASE = 1 << IS_SUCCESS_WHITE_SHIFT, IS_SUCCESS_BLACK_MASK = 0xf * IS_SUCCESS_BLACK_BASE, IS_SUCCESS_WHITE_MASK = 0xf * IS_SUCCESS_WHITE_BASE, IS_FAIL_SHIFT = 24, IS_FAIL_BLACK_SHIFT = IS_FAIL_SHIFT, IS_FAIL_WHITE_SHIFT = IS_FAIL_SHIFT + WHITE_SHIFT, IS_FAIL_BLACK_BASE = 1 << IS_FAIL_SHIFT, IS_FAIL_WHITE_BASE = 1 << (IS_FAIL_SHIFT + WHITE_SHIFT), IS_FAIL_BLACK_MASK = 0xf * IS_FAIL_BLACK_BASE, IS_FAIL_WHITE_MASK = 0xfLL * IS_FAIL_WHITE_BASE } |
Private メソッド | |
template<Player P> | |
int | is_success_flag (int pass_left) const |
template<Player P> | |
int | is_fail_flag (int pass_left) const |
Private 変数 | |
osl::Move | move |
int | flags |
int | order |
Static Private 変数 | |
static std::string | FlagsStr [] |
フレンド | |
std::ostream & | operator<< (std::ostream &os, const NtesukiMove &move) |
ntesukiMove.h の 18 行で定義されています。
enum osl::ntesuki::NtesukiMove::Flags [private] |
NONE | |
CHECK_FLAG | |
PAWN_DROP_CHECKMATE_FLAG |
If this move is a check move.
|
IMMEDIATE_CHECKMATE |
If this move is a pawn drop checkmate foul.
|
TO_OLDER_CHILD |
If this move is an immidiate checkmate.
|
NOPROMOTE | If the distance of the parent is larger than the child |
INTERPOSE | A promotable PAWN,ROOK,BISHOP move without promotion |
ATTACK_FLAG | Aigoma |
BY_SIMULATION | Attack move candidate |
LAME_LONG | Value of the node after this move determined by simulation |
WHITE_SHIFT | |
IS_SUCCESS_SHIFT | |
IS_SUCCESS_BLACK_SHIFT |
This move leads to checkmate success.
|
IS_SUCCESS_WHITE_SHIFT | |
IS_SUCCESS_BLACK_BASE | |
IS_SUCCESS_WHITE_BASE | |
IS_SUCCESS_BLACK_MASK | |
IS_SUCCESS_WHITE_MASK | |
IS_FAIL_SHIFT | |
IS_FAIL_BLACK_SHIFT |
This move leads to checkmate fail.
|
IS_FAIL_WHITE_SHIFT | |
IS_FAIL_BLACK_BASE | |
IS_FAIL_WHITE_BASE | |
IS_FAIL_BLACK_MASK | |
IS_FAIL_WHITE_MASK |
ntesukiMove.h の 20 行で定義されています。
osl::ntesuki::NtesukiMove::NtesukiMove | ( | ) |
osl::ntesuki::NtesukiMove::NtesukiMove | ( | osl::Move | m | ) |
ntesukiMove.cc の 15 行で定義されています。
ntesukiMove.cc の 22 行で定義されています。
osl::ntesuki::NtesukiMove::NtesukiMove | ( | const NtesukiMove & | m | ) |
ntesukiMove.cc の 29 行で定義されています。
osl::ntesuki::NtesukiMove::~NtesukiMove | ( | ) |
ntesukiMove.cc の 53 行で定義されています。
int osl::ntesuki::NtesukiMove::is_success_flag | ( | int | pass_left | ) | const [inline, private] |
ntesukiMove.tcc の 20 行で定義されています。
参照先 osl::BLACK, IS_SUCCESS_BLACK_SHIFT, IS_SUCCESS_WHITE_SHIFT, ntesuki_assert, と osl::WHITE.
int osl::ntesuki::NtesukiMove::is_fail_flag | ( | int | pass_left | ) | const [inline, private] |
ntesukiMove.tcc の 32 行で定義されています。
参照先 osl::BLACK, IS_FAIL_BLACK_SHIFT, IS_FAIL_WHITE_SHIFT, と ntesuki_assert.
osl::ntesuki::NtesukiMove osl::ntesuki::NtesukiMove::operator= | ( | const NtesukiMove & | m | ) |
ntesukiMove.cc の 37 行で定義されています。
参照先 flags, h_a_disproof, h_a_proof, h_d_disproof, h_d_proof, move, と order.
osl::ntesuki::NtesukiMove osl::ntesuki::NtesukiMove::INVALID | ( | ) | [static] |
ntesukiMove.cc の 59 行で定義されています。
参照先 osl::Move::INVALID(), と NtesukiMove().
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::defenseForProof(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::handleTonshi(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), osl::ntesuki::NtesukiRecord::setUpAttackNode(), と osl::ntesuki::NtesukiRecord::setUpDefenseNode().
void osl::ntesuki::NtesukiMove::setCheck | ( | ) |
ntesukiMove.cc の 63 行で定義されています。
参照先 CHECK_FLAG, flags, と ntesuki_assert.
参照元 osl::ntesuki::NtesukiMoveList::NtesukiMoveList(), と osl::ntesuki::NtesukiRecord::setUpAttackNode().
bool osl::ntesuki::NtesukiMove::isCheck | ( | ) | const |
ntesukiMove.cc の 70 行で定義されています。
参照先 CHECK_FLAG, と flags.
参照元 osl::ntesuki::NtesukiMoveList::add(), osl::ntesuki::OracleProverLight::attack(), osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiRecord::calcProofPiecesAnd(), osl::ntesuki::OracleProverLight::defense(), osl::ntesuki::NtesukiSimulationSearcher::defenseForProof(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), と osl::ntesuki::NtesukiSearcher::selectMoveDefense().
void osl::ntesuki::NtesukiMove::setOrder | ( | int | o | ) |
int osl::ntesuki::NtesukiMove::getOrder | ( | ) | const |
ntesukiMove.cc の 83 行で定義されています。
参照先 order.
参照元 osl::ntesuki::operator<<(), と osl::ntesuki::NtesukiSearcher::selectMoveAttack().
void osl::ntesuki::NtesukiMove::setInterpose | ( | ) |
bool osl::ntesuki::NtesukiMove::isInterpose | ( | ) | const |
ntesukiMove.cc の 110 行で定義されています。
void osl::ntesuki::NtesukiMove::setLameLong | ( | ) |
bool osl::ntesuki::NtesukiMove::isLameLong | ( | ) | const |
void osl::ntesuki::NtesukiMove::setBySimulation | ( | ) |
bool osl::ntesuki::NtesukiMove::isBySimulation | ( | ) | const |
void osl::ntesuki::NtesukiMove::setNoPromote | ( | ) |
bool osl::ntesuki::NtesukiMove::isNoPromote | ( | ) | const |
void osl::ntesuki::NtesukiMove::setToOld | ( | ) |
bool osl::ntesuki::NtesukiMove::isToOld | ( | ) | const |
template void osl::ntesuki::NtesukiMove::setImmediateCheckmate< WHITE > | ( | ) | [inline] |
ntesukiMove.tcc の 8 行で定義されています。
参照先 osl::BLACK, flags, IMMEDIATE_CHECKMATE, IS_SUCCESS_BLACK_MASK, と IS_SUCCESS_WHITE_MASK.
bool osl::ntesuki::NtesukiMove::isImmediateCheckmate | ( | ) | const |
ntesukiMove.cc の 144 行で定義されています。
参照先 flags, と IMMEDIATE_CHECKMATE.
参照元 osl::ntesuki::OracleProverLight::attack(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::OracleProverLight::startFromAttack(), osl::ntesuki::NtesukiSimulationSearcher::startFromAttackProof(), と osl::ntesuki::NtesukiSimulationSearcher::startFromDefenseProof().
template void osl::ntesuki::NtesukiMove::setCheckmateSuccess< WHITE > | ( | int | pass_left | ) | [inline] |
ntesukiMove.tcc の 45 行で定義されています。
参照先 flags, と ntesuki_assert.
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), と osl::ntesuki::NtesukiSearcher::simulateSiblingsSuccess().
bool osl::ntesuki::NtesukiMove::isCheckmateSuccess | ( | int | pass_left | ) | const [inline] |
bool osl::ntesuki::NtesukiMove::isCheckmateSuccessSlow | ( | Player | P, | |
int | pass_left | |||
) | const |
template void osl::ntesuki::NtesukiMove::setCheckmateFail< WHITE > | ( | int | pass_left | ) | [inline] |
ntesukiMove.tcc の 61 行で定義されています。
参照先 flags, と ntesuki_assert.
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), と osl::ntesuki::NtesukiSearcher::simulateSiblingsFail().
bool osl::ntesuki::NtesukiMove::isCheckmateFail | ( | int | pass_left | ) | const [inline] |
ntesukiMove.tcc の 71 行で定義されています。
参照先 flags.
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), と osl::ntesuki::NtesukiSearcher::simulateSiblingsFail().
bool osl::ntesuki::NtesukiMove::isCheckmateFailSlow | ( | Player | P, | |
int | pass_left | |||
) | const |
void osl::ntesuki::NtesukiMove::setPawnDropCheckmate | ( | ) |
bool osl::ntesuki::NtesukiMove::isPawnDropCheckmate | ( | ) | const |
void osl::ntesuki::NtesukiMove::setHEstimates | ( | unsigned short | p_a, | |
unsigned short | d_a, | |||
unsigned short | p_d, | |||
unsigned short | d_d | |||
) |
void osl::ntesuki::NtesukiMove::setCEstimates | ( | unsigned short | p, | |
unsigned short | d | |||
) |
bool osl::ntesuki::NtesukiMove::isValid | ( | ) | const |
ntesukiMove.cc の 205 行で定義されています。
参照先 osl::Move::isValid(), と move.
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiRecord::setDisproofPieces(), osl::ntesuki::NtesukiRecord::setProofPieces(), osl::ntesuki::NtesukiRecord::setResult(), と osl::ntesuki::OracleProverLight::startFromAttack().
bool osl::ntesuki::NtesukiMove::isInvalid | ( | ) | const |
ntesukiMove.cc の 207 行で定義されています。
参照先 osl::Move::isInvalid(), と move.
参照元 osl::ntesuki::NtesukiSearcher::attack(), osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiSearcher::defense(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), と osl::ntesuki::NtesukiSearcher::handleInterpose().
bool osl::ntesuki::NtesukiMove::isNormal | ( | ) | const |
bool osl::ntesuki::NtesukiMove::isPass | ( | ) | const |
ntesukiMove.cc の 211 行で定義されています。
参照先 osl::Move::isPass(), と move.
参照元 osl::ntesuki::NtesukiTable::allocateWithMove(), osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::OracleProverLight::defense(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::defenseForProof(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiTable::Table::forEachRecordFrom(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), osl::ntesuki::NtesukiRecord::setDisproofPieces(), osl::ntesuki::NtesukiRecord::setProofPieces(), RecordPrinter2::withChildMove(), と RecordPrinter::withChildMove().
bool osl::ntesuki::NtesukiMove::isDrop | ( | ) | const |
osl::Position osl::ntesuki::NtesukiMove::to | ( | ) | const |
osl::Ptype osl::ntesuki::NtesukiMove::ptype | ( | ) | const |
ntesukiMove.cc の 217 行で定義されています。
参照先 move, と osl::Move::ptype().
参照元 osl::ntesuki::NtesukiRecord::calcProofPiecesOr(), と osl::ntesuki::NtesukiRecord::setDisproofPieces().
osl::Move osl::ntesuki::NtesukiMove::getMove | ( | ) | const |
ntesukiMove.cc の 219 行で定義されています。
参照先 move.
参照元 osl::ntesuki::NtesukiMoveList::add(), osl::ntesuki::NtesukiTable::allocateWithMove(), osl::ntesuki::OracleProverLight::attack(), osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiRecord::calcProofPiecesOr(), osl::ntesuki::OracleProverLight::defense(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::defenseForProof(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiMoveList::find(), osl::ntesuki::NtesukiTable::findWithMove(), osl::ntesuki::NtesukiTable::findWithMoveConst(), osl::ntesuki::NtesukiTable::Table::forEachRecordFrom(), RecordPrinter2::noChildMove(), MarkAndSweep::Compare::operator()(), RecordPrinter2::Compare::operator()(), RecordPrinter2::operator()(), RecordPrinter::Compare::operator()(), RecordPrinter::operator()(), DifferentMove::operator()(), osl::ntesuki::operator<<(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), osl::ntesuki::NtesukiRecord::setDisproofPieces(), osl::ntesuki::NtesukiSearcher::simulateSiblingsFail(), osl::ntesuki::NtesukiSearcher::simulateSiblingsSuccess(), RecordPrinter2::withChildMove(), と RecordPrinter::withChildMove().
bool osl::ntesuki::NtesukiMove::operator== | ( | const NtesukiMove & | rhs | ) | const |
bool osl::ntesuki::NtesukiMove::operator!= | ( | const NtesukiMove & | rhs | ) | const |
void osl::ntesuki::NtesukiMove::flagsToStream | ( | std::ostream & | os | ) | const |
std::ostream& operator<< | ( | std::ostream & | os, | |
const NtesukiMove & | move | |||
) | [friend] |
ntesukiMove.cc の 247 行で定義されています。
std::string osl::ntesuki::NtesukiMove::FlagsStr [static, private] |
osl::Move osl::ntesuki::NtesukiMove::move [private] |
ntesukiMove.h の 76 行で定義されています。
参照元 getMove(), isDrop(), isInvalid(), isNormal(), isPass(), isValid(), operator!=(), operator=(), operator==(), ptype(), と to().
int osl::ntesuki::NtesukiMove::flags [private] |
ntesukiMove.h の 77 行で定義されています。
参照元 flagsToStream(), isBySimulation(), isCheck(), isCheckmateFail(), isCheckmateSuccess(), isImmediateCheckmate(), isInterpose(), isLameLong(), isNoPromote(), isPawnDropCheckmate(), isToOld(), operator=(), setBySimulation(), setCheck(), setCheckmateFail(), setCheckmateSuccess(), setImmediateCheckmate(), setInterpose(), setLameLong(), setNoPromote(), setPawnDropCheckmate(), と setToOld().
int osl::ntesuki::NtesukiMove::order [private] |
unsigned short osl::ntesuki::NtesukiMove::h_a_proof |
unsigned short osl::ntesuki::NtesukiMove::h_a_disproof |
unsigned short osl::ntesuki::NtesukiMove::h_d_proof |
unsigned short osl::ntesuki::NtesukiMove::h_d_disproof |