My Project
|
駒. More...
#include <basic_type.h>
Public Member Functions | |
int | intValue () const |
Piece (Player owner, Ptype ptype, int num, Square square) | |
Piece () | |
Ptype | ptype () const |
PtypeO | ptypeO () const |
int | number () const |
const Square | square () const |
Piece & | operator+= (Offset offset) |
void | setSquare (Square square) |
template<Player P> | |
bool | isOnBoardByOwner () const |
piece がプレイヤーPの持ち物でかつボード上にある駒の場合は true. | |
bool | isOnBoardByOwner (Player owner) const |
isOnBoardByOwner の通常関数のバージョン. | |
const Piece | promote () const |
const Piece | unpromote () const |
const Piece | captured () const |
取られたpieceを作成. | |
const Piece | promoteWithMask (int promote_mask) const |
const Piece | checkPromote (bool promotep) const |
bool | isPromoted () const |
promoteした駒かどうかをチェックする | |
bool | isOnBoardNotPromoted () const |
promoteしていないOnBoardの駒であることのチェック Lance位しか使い道がない? | |
bool | isPromotedNotKingGold () const |
bool | isEmpty () const |
bool | isEdge () const |
template<Ptype T> | |
bool | isPtype () const |
bool | isPlayerPtype (Player pl, Ptype ptype) const |
あるpieceがPlayer pの持ち物でPtype ptypeであるかどうかをチェックする. TはEMPTY, EDGEではない. | |
bool | isPlayerBasicPtype (Player pl, Ptype ptype) const |
あるpieceがPlayer pの持ち物でBASIC typeがptypeであるかどうかをチェックする. TはEMPTY, EDGEではない. | |
bool | isPiece () const |
bool | pieceIsBlack () const |
pieceであることが分かっている時に,更にBlackかどうかをチェックする. | |
Player | owner () const |
template<Player P> | |
bool | canMoveOn () const |
Player Pの駒が,thisの上に移動できるか? PIECE_EMPTY 0x00008000 BLACK_PIECE 0x000XxxYY X>=2, YY>0 PIECE_EDGE 0xfff14000 WHITE_PIECE 0xfffXxxYY X>=2, YY>0. | |
bool | canMoveOn (Player pl) const |
bool | isOnBoard () const |
Static Public Member Functions | |
static const Piece | makeDirect (int value) |
static const Piece | EMPTY () |
static const Piece | EDGE () |
static const Piece | makeKing (Player owner, Square square) |
玉を作る | |
static bool | isEmptyNum (int num) |
static bool | isEdgeNum (int num) |
static bool | isPieceNum (int num) |
Static Public Attributes | |
static const int | SIZE =40 |
static const int | BitOffsetPtype =16 |
static const int | BitOffsetPromote =BitOffsetPtype+3 |
static const int | BitOffsetMovePromote =BitOffsetPromote+4 |
Private Member Functions | |
Piece (int p) | |
Private Attributes | |
int | piece |
駒.
駒はptypeo(-15 - 15), 番号(0-39), ポジション(0-0xff)からなる 上位16 bitでptypeo, 8bitで番号, 8bitでポジションとする. 空きマスは 黒,PTYPE_EMPTY, 番号 0x80, ポジション 0 盤外は 白,PTYPE_EDGE, 番号 0x40, ポジション 0
Definition at line 787 of file basic_type.h.
|
inlineprivate |
Definition at line 790 of file basic_type.h.
Definition at line 803 of file basic_type.h.
|
inline |
Definition at line 809 of file basic_type.h.
Referenced by captured(), checkPromote(), EDGE(), EMPTY(), makeDirect(), promote(), promoteWithMask(), and unpromote().
|
inline |
Player Pの駒が,thisの上に移動できるか? PIECE_EMPTY 0x00008000 BLACK_PIECE 0x000XxxYY X>=2, YY>0 PIECE_EDGE 0xfff14000 WHITE_PIECE 0xfffXxxYY X>=2, YY>0.
P | 手番 |
Definition at line 980 of file basic_type.h.
References canMoveOn().
Referenced by canMoveOn(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::rating::Threatmate::captureForKnightCheck(), osl::mobility::countMobilityBoth(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::RookPromoteDefense::eval(), osl::checkmate::King8Info::hasEffectMask(), and osl::eval::ml::SilverFork::matchGold().
|
inline |
Definition at line 981 of file basic_type.h.
References osl::BLACK, and piece.
|
inline |
取られたpieceを作成.
unpromoteして,Squareは0に 相手の持ちものにする
Definition at line 879 of file basic_type.h.
References piece, and Piece().
Referenced by osl::NumEffectState::prologueCapture().
|
inline |
Definition at line 891 of file basic_type.h.
|
inlinestatic |
Definition at line 798 of file basic_type.h.
References osl::EDGE_NUM, Piece(), osl::PTYPE_EDGE, osl::Square::STAND(), and osl::WHITE.
Referenced by osl::rating::PatternBlock::find(), osl::SimpleState::init(), osl::mobility::MobilityTable::MobilityTable(), and osl::operator<<().
|
inlinestatic |
Definition at line 797 of file basic_type.h.
References osl::BLACK, osl::EMPTY_NUM, Piece(), osl::PTYPE_EMPTY, and osl::Square::STAND().
Referenced by osl::NumEffectState::epilogueDrop(), osl::NumEffectState::epilogueSimple(), osl::NumEffectState::findAttackAt(), osl::NumEffectState::findAttackAtStrict(), osl::NumEffectState::findAttackNotBy(), osl::NumEffectState::findLongAttackAt(), osl::rating::PatternGroup::findMatch(), osl::NumEffectState::findThreatenedPiece(), osl::NumEffectState::hasEffectAt(), osl::SimpleState::init(), osl::NumEffectState::inUnblockableCheck(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), osl::NumEffectState::makeMove(), osl::NumEffectState::makeUnmakeMove(), osl::rating::Pattern::match(), osl::SimpleState::nextPiece(), osl::rating::PatternLong::nextPieceOrEnd(), osl::operator<<(), osl::NumEffectState::prologueCapture(), osl::NumEffectState::prologueSimple(), and osl::NumEffectState::selectCheapPiece().
|
inline |
Definition at line 796 of file basic_type.h.
References piece.
Referenced by osl::Move::newAddCapture(), osl::Move::newCapture(), osl::operator<(), and osl::operator==().
|
inline |
Definition at line 919 of file basic_type.h.
References piece.
Referenced by osl::move_probability::BishopAttack::addOne(), osl::move_probability::PatternCommon::addOne(), osl::rating::DefenseKing8::count(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::EnterKingDefense::evalOne(), osl::effect_util::SendOffSquare::find(), osl::checkmate::King8Info::hasEffectMask(), osl::eval::ml::KingXBlockedBase::isBlocked(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::LanceAttack::match(), osl::eval::ml::SilverFork::matchGold(), osl::rating::PatternLong::nextPieceOrEnd(), osl::csa::show(), and osl::move_probability::PawnAttack::squareStatus().
|
inlinestatic |
Definition at line 922 of file basic_type.h.
References isEmptyNum().
Referenced by osl::effect::NumSimpleEffectTable::doEffectLong(), osl::NumEffectState::makePinOpenDir(), and osl::NumEffectState::recalcPinOpen().
|
inline |
Definition at line 913 of file basic_type.h.
References piece.
Referenced by osl::move_probability::BishopAttack::addOne(), osl::move_probability::AddEffectLong::addOne(), osl::rating::BadLance::basicMatch(), osl::eval::ml::KnightCheck::canCheck(), osl::rating::Threatmate::captureForKnightCheck(), osl::record::KisenUtils::convertMove(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King8Effect::effectState(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::AnagumaEmpty::evalOne(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::NumEffectState::forEachEffectOfPieceLongDir(), osl::checkmate::King8Info::hasEffectMask(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::eval::ml::King25EffectEach< Stage >::index(), osl::SimpleState::isConsistent(), osl::SimpleState::isEmptyBetween(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::rating::LongTarget2::match(), osl::move_probability::LanceAttack::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::eval::ml::King8EffectBase::MakeEffectStateSimple::operator()(), osl::eval::ml::PinPtypeAll::pawnAttack(), osl::usi::show(), osl::csa::show(), osl::eval::ml::BishopRookFork::testCenter(), and osl::move_probability::StateInfo::updatePinnedGenerals().
|
inlinestatic |
Definition at line 916 of file basic_type.h.
Referenced by osl::effect_util::AdditionalOrShadow::count(), osl::effect::NumSimpleEffectTable::doEffectLong(), isEdgeNum(), osl::NumEffectState::makePinOpenDir(), and osl::NumEffectState::recalcPinOpen().
|
inline |
Definition at line 985 of file basic_type.h.
References osl::Square::isPieceStand(), osl::isValid(), and square().
Referenced by osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::mobility::BishopMobility::countAll(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::BishopMobility::countBoth(), osl::mobility::LanceMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::BishopMobility::countSafe(), osl::mobility::LanceMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::SimpleState::emulateHandPiece(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::MajorY< Opening, MajorBasic >::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::PiecePair::index(), osl::eval::ml::RookRook::index(), osl::SimpleState::isConsistent(), osl::NumEffectState::isConsistent(), osl::SimpleState::isOnBoard(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::mobility::MobilityTable::MobilityTable(), osl::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::record::myshogi::show(), osl::record::myshogi::show(), osl::move_probability::BlockLong::updateCache(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), and osl::eval::ml::PiecePair::value().
|
inline |
piece がプレイヤーPの持ち物でかつボード上にある駒の場合は true.
敵の駒だったり,駒台の駒だったり,Piece::EMPTY(), PIECE_EDGEの場合は false
P(template) | - プレイヤー |
piece | - |
Definition at line 852 of file basic_type.h.
References isOnBoardByOwner().
Referenced by osl::eval::ml::KnightFork::accumulate(), osl::progress::Effect5x3WithBonus::attackEffect3(), osl::eval::ml::KnightCheck::canCheck(), osl::enter_king::EnterKing::canDeclareWin(), osl::enter_king::EnterKing::canDeclareWin(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::PawnAdvanceUtil::cantAdvance(), osl::rating::ImmediateAddSupport::Test::doAction(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::BishopRookFork::evalOne(), osl::move_probability::StateInfo::finishUpdate(), osl::checkmate::King8Info::hasEffectMask(), osl::eval::ml::KingXBlockedBase::isBlocked(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), isOnBoardByOwner(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::CoverPawn::match(), osl::move_probability::LanceAttack::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::effect_util::SendOffSquare::onlyOneSupport(), osl::eval::ml::King8EffectBase::MakeEffectStateDefense::operator()(), osl::ki2::show(), and osl::move_probability::StateInfo::updatePinnedGenerals().
|
inline |
isOnBoardByOwner の通常関数のバージョン.
Definition at line 856 of file basic_type.h.
References osl::BLACK, owner(), and piece.
|
inline |
promoteしていないOnBoardの駒であることのチェック Lance位しか使い道がない?
Definition at line 904 of file basic_type.h.
References piece.
Referenced by osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::RookPromoteDefense::eval(), and osl::eval::ml::BishopHead::eval().
|
inline |
Definition at line 953 of file basic_type.h.
References piece.
Referenced by osl::move_probability::BishopAttack::addOne(), osl::move_probability::AddEffectLong::addOne(), osl::move_probability::MoveInfo::adhocAdjustAttackCheckmateDefender(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::move_probability::MoveInfo::adhocAdjustKeepCheckmateDefender(), osl::checkmate::OracleAdjust::attack(), osl::rating::DefenseKing8::blocking(), osl::record::KisenUtils::convertMove(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PiecePair::evalWithUpdate(), osl::effect_util::AdditionalEffect::find(), osl::rating::PatternLong2::find(), osl::rating::PatternBlock::find(), osl::eval::See::findAdditionalPieces(), osl::NumEffectState::findLongAttackAt(), osl::NumEffectState::findLongAttackAt(), osl::rating::PatternLongGroup2::findMatch(), osl::NumEffectState::hasEffectByPiece(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::eval::ml::PiecePair::index(), osl::SimpleState::isConsistent(), osl::move_probability::EscapeThreatened::match(), osl::operator<<(), owner(), pieceIsBlack(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::csa::show(), osl::move_probability::PawnAttack::squareStatus(), and osl::move_probability::PatternCommon::updateCacheOne().
|
inlinestatic |
Definition at line 926 of file basic_type.h.
Referenced by osl::effect::NumSimpleEffectTable::doEffectShort(), osl::move_classifier::KingOpenMove< P >::isMember(), osl::NumEffectState::makePinOpenDir(), and osl::NumEffectState::recalcPinOpen().
あるpieceがPlayer pの持ち物でBASIC typeがptypeであるかどうかをチェックする. TはEMPTY, EDGEではない.
Definition at line 945 of file basic_type.h.
References BitOffsetPtype, osl::canPromote(), osl::isBasic(), isPlayerPtype(), piece, osl::promote(), ptype(), osl::PTYPE_MAX, and osl::PTYPE_PIECE_MIN.
あるpieceがPlayer pの持ち物でPtype ptypeであるかどうかをチェックする. TはEMPTY, EDGEではない.
Definition at line 937 of file basic_type.h.
References BitOffsetPtype, piece, ptype(), osl::PTYPE_MAX, and osl::PTYPE_PIECE_MIN.
Referenced by osl::eval::ml::AttackMajorsInBase::addOne(), osl::eval::ml::PawnAdvanceAll::evalWithUpdateBang(), and isPlayerBasicPtype().
|
inline |
promoteした駒かどうかをチェックする
Definition at line 898 of file basic_type.h.
References piece.
Referenced by osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::MajorY< Opening, MajorBasic >::index(), osl::eval::ml::RookRook::index(), osl::eval::ml::RookPawnY::indexY(), osl::SimpleState::isConsistent(), osl::NumEffectState::isConsistent(), isPromotedNotKingGold(), osl::move_probability::PromotionBySacrifice::match(), osl::eval::ml::SilverFork::matchRook(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::book::OPSquare::OPSquare(), promoteWithMask(), and osl::move_probability::BlockLong::updateCache().
|
inline |
Definition at line 908 of file basic_type.h.
References osl::GOLD, isPromoted(), osl::KING, and ptype().
Referenced by osl::effect_action::AlwaysMove< Action >::doActionPtype(), osl::effect_action::BetterToPromote< Action >::doActionPtype(), osl::SimpleState::initPawnMask(), and osl::SimpleState::isConsistent().
|
inline |
Definition at line 930 of file basic_type.h.
References BitOffsetPtype, and piece.
Referenced by osl::checkmate::OracleAdjust::attack(), and osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuide().
|
inlinestatic |
Definition at line 795 of file basic_type.h.
References Piece().
|
static |
|
inline |
Definition at line 828 of file basic_type.h.
References piece.
Referenced by osl::move_probability::BlockLong::addPiece(), osl::eval::See::computeValue(), 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::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::NumSimpleEffectTable::doEffect(), osl::effect::NumSimpleEffectTable::doEffectLong(), osl::effect::NumSimpleEffectTable::doEffectShort(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::See::findEffectPiecesAfterMove(), osl::NumEffectState::findLongAttackAt(), osl::NumEffectState::forEachEffectNotBy(), osl::checkmate::Dfpn::generateCheck(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::NumEffectState::hasEffectByPiece(), osl::NumEffectState::hasEffectNotBy(), osl::SimpleState::isConsistent(), osl::move_classifier::KingOpenMove< P >::isMember(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::ToEffectLong::match(), osl::NumEffectState::mobilityOf(), osl::operator<<(), osl::NumEffectState::pinAttacker(), osl::NumEffectState::pinnedDir(), osl::NumEffectState::prologueCapture(), osl::NumEffectState::prologueSimple(), osl::NumEffectState::recalcPinOpen(), osl::csa::show(), osl::move_probability::ToEffect::supportAttack(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), and osl::NumEffectState::wasCheckEvasion().
Definition at line 836 of file basic_type.h.
References osl::Offset::intValue(), and piece.
|
inline |
Definition at line 963 of file basic_type.h.
References isPiece(), and piece.
Referenced by osl::move_probability::BishopAttack::addOne(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::eval::See::computeValue(), osl::record::KisenUtils::convertMove(), osl::effect_util::AdditionalOrShadow::count(), osl::mobility::BishopMobility::countAll(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::BishopMobility::countBoth(), osl::mobility::LanceMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::BishopMobility::countSafe(), osl::mobility::LanceMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::SimpleState::emulateCapture(), osl::SimpleState::emulateHandPiece(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::MajorY< Opening, MajorBasic >::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::King8EffectEmptySquare< false >::evalWithUpdate(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::effect_util::AdditionalEffect::find(), osl::eval::See::findAdditionalPieces(), osl::NumEffectState::findLongAttackAt(), osl::NumEffectState::findLongAttackAt(), osl::rating::AttackKing8Group::findMatch(), osl::rating::PatternGroup::findMatch(), osl::rating::PatternLongGroup2::findMatch(), osl::SimpleState::flipHorizontal(), osl::move_generator::Escape< Action >::generateEscape(), osl::effect_util::AdditionalEffect::hasEffect(), osl::NumEffectState::hasEffectNotBy(), osl::eval::ml::KingPieceRelative::index(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::index(), osl::eval::ml::King25EffectEach< Stage >::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::Pin::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::MajorY< Opening, MajorBasic >::index(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::eval::ml::NonPawnAttacked::indexK(), osl::eval::ml::PawnDropBoth::indexX(), osl::eval::ml::PawnDropBoth::indexY(), osl::eval::ml::RookPawnY::indexY(), osl::SimpleState::initPawnMask(), osl::SimpleState::isConsistent(), osl::move_classifier::SafeMove< P >::isMember(), isOnBoardByOwner(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::rating::LongTarget2::match(), osl::rating::RookDefense::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::book::MiniBoard::MiniBoard(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::mobility::MobilityTable::MobilityTable(), osl::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::operator<<(), osl::book::OPiece::OPiece(), osl::book::OSquare::OSquare(), osl::NumEffectState::pinAttacker(), osl::NumEffectState::pinnedCanMoveTo(), osl::NumEffectState::pinnedDir(), osl::SimpleState::rotate180(), osl::csa::show(), osl::record::myshogi::show(), osl::move_probability::PawnAttack::squareStatus(), osl::move_probability::BlockLong::updateCache(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), and osl::NumEffectState::wasCheckEvasion().
|
inline |
pieceであることが分かっている時に,更にBlackかどうかをチェックする.
Definition at line 959 of file basic_type.h.
References isPiece(), and piece.
Referenced by osl::eval::ml::LanceMobilityAll::eval().
|
inline |
Definition at line 865 of file basic_type.h.
References osl::canPromote(), piece, Piece(), and ptype().
|
inline |
Definition at line 885 of file basic_type.h.
References BitOffsetMovePromote, BitOffsetPromote, isPromoted(), piece, and Piece().
Referenced by osl::NumEffectState::prologueCapture(), and osl::NumEffectState::prologueSimple().
|
inline |
Definition at line 821 of file basic_type.h.
References BitOffsetPtype, and piece.
Referenced by osl::eval::ml::KnightFork::accumulate(), osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::BishopAttack::addOne(), osl::eval::ml::PiecePairKing::addSub(), osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::checkmate::OracleAdjust::attack(), osl::rating::DefenseKing8::blocking(), osl::enter_king::EnterKing::canDeclareWin(), osl::enter_king::EnterKing::canDeclareWin(), osl::record::KisenUtils::convertMove(), osl::rating::Block::count(), osl::mobility::BishopMobility::countAll(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::mobility::BishopMobility::countBoth(), osl::mobility::LanceMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::BishopMobility::countSafe(), osl::mobility::LanceMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::effect_action::AlwaysMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::effect_action::AlwaysMove< Action >::doActionPtype(), osl::effect_action::BetterToPromote< Action >::doActionPtype(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::NumEffectState::doCaptureMove(), osl::NumEffectState::doUndoCaptureMove(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::SimpleState::emulateCapture(), osl::SimpleState::emulateHandPiece(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::Pin::eval(), osl::eval::ml::SimplePin::eval(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::Promotion37::evalOne(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::rating::PatternBlock::find(), osl::rating::AttackKing8Group::findMatch(), osl::rating::PatternGroup::findMatch(), osl::rating::PatternLongGroup2::findMatch(), osl::rating::PtypeAttackedGroup::findMatch(), osl::SimpleState::flipHorizontal(), osl::move_generator::Escape< Action >::generateEscape(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::rating::PinAttack::index(), osl::rating::ImmediateAddSupport::index(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::KingPieceRelativeNoSupport::index(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::eval::ml::NonPawnAttacked::indexK(), osl::progress::ml::NewProgress::indexRelative(), osl::SimpleState::isConsistent(), isPlayerBasicPtype(), isPlayerPtype(), isPromotedNotKingGold(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::record::KisenPlusFile::load(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::rating::LongTarget2::match(), osl::rating::PtypeAttacked::match(), osl::rating::PinAttack::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::CoverFork::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::AttackFromOpposingSliders::match(), osl::move_probability::OpposingPawn::match(), osl::move_probability::LanceAttack::match(), osl::move_probability::FromEffect::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::book::MiniBoard::MiniBoard(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::mobility::MobilityTable::MobilityTable(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::PieceBasicLessThan::operator()(), osl::operator<<(), osl::book::OPiece::OPiece(), promote(), osl::progress::ml::NewProgress::promotion37One(), osl::SimpleState::rotate180(), osl::ki2::show(), osl::csa::show(), osl::record::myshogi::show(), osl::move_probability::PawnAttack::squareStatus(), osl::psn::strToMove(), osl::kakinoki::strToMove(), osl::csa::strToMove(), osl::eval::ml::PiecePairKing::sub(), osl::move_probability::ToEffect::supportAttack(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), and osl::move_probability::StateInfo::updatePinnedGenerals().
|
inline |
Definition at line 824 of file basic_type.h.
References BitOffsetPtype, and piece.
Referenced by osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::eval::ml::PiecePair::adjust12One(), osl::eval::ml::PawnAdvanceUtil::cantAdvance(), osl::effect::NumSimpleEffectTable::doEffect(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::PieceEval::eval(), osl::eval::ml::King3Pieces::evalOne(), osl::eval::ml::BishopEffectBase::evalOne(), osl::eval::ml::RookEffectBase::evalOne(), osl::eval::ml::PawnPtypeOPtypeO::evalWithUpdate(), osl::effect_util::AdditionalEffect::find(), osl::eval::See::findAdditionalPieces(), osl::NumEffectState::forEachEffectOfPiece(), osl::hash::HashKey::HashKey(), osl::eval::ml::King25EffectEachBoth::index(), osl::eval::ml::PtypeYY::index(), osl::eval::ml::PiecePair::index(), osl::NumEffectState::inUnblockableCheck(), osl::SimpleState::isAlmostValidMove(), osl::move_probability::BreakThreatmate::isDefendingKing8(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::PromotionBySacrifice::match(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::PiecePtypeMoreThan::operator()(), osl::operator==(), osl::NumEffectState::prologueCapture(), osl::NumEffectState::prologueDrop(), osl::NumEffectState::prologueSimple(), osl::progress::PtypeProgress::PtypeProgress(), osl::usi::show(), osl::effect_action::StorePtypeOSquare::store(), osl::eval::ml::PiecePair::sum12One(), osl::move_probability::PatternCommon::updateCacheOne(), osl::move_probability::StateInfo::updatePinnedGenerals(), osl::eval::ml::PiecePair::value(), osl::eval::ml::PiecePair::value(), and osl::eval::ml::PiecePair::valueCompiled().
|
inline |
Definition at line 841 of file basic_type.h.
References piece, square(), and osl::Square::uintValue().
|
inline |
Definition at line 832 of file basic_type.h.
References osl::Square::makeDirect(), and piece.
Referenced by osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::BlockLong::addPiece(), osl::eval::ml::PiecePairKing::addSub(), osl::move_probability::MoveInfo::adhocAdjustKeepCheckmateDefender(), osl::move_probability::MoveInfo::adhocAdjustSlider(), osl::checkmate::OracleAdjust::attack(), osl::rating::DefenseKing8::blocking(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::eval::ml::PawnAdvanceUtil::cantAdvance(), osl::eval::See::computeValue(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::BishopMobility::countBoth(), osl::mobility::LanceMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::RookMobility::countHorizontalSafe(), osl::mobility::BishopMobility::countSafe(), osl::mobility::LanceMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::mobility::RookMobility::countVerticalSafe(), osl::move_probability::CoverFork::defending(), osl::effect_action::AlwaysMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::effect_action::AlwaysMove< Action >::doActionPtype(), osl::effect_action::BetterToPromote< Action >::doActionPtype(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::NumSimpleEffectTable::doEffect(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::SimpleState::emulateCapture(), osl::SimpleState::emulateHandPiece(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King8EffectEmptySquare< false >::evalWithUpdate(), osl::eval::ml::PiecePair::evalWithUpdate(), osl::eval::ml::PawnAdvanceAll::evalWithUpdateBang(), osl::effect_util::AdditionalEffect::find(), osl::rating::PatternLong2::find(), osl::rating::PatternBlock::find(), osl::eval::See::findAdditionalPieces(), osl::eval::See::findEffectPiecesAfterMove(), osl::SimpleState::flipHorizontal(), osl::NumEffectState::forEachEffectOfPiece(), osl::move_generator::Escape< Action >::generateEscape(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::effect_util::AdditionalEffect::hasEffect(), osl::NumEffectState::hasEffectInDirection(), osl::hash::HashKey::HashKey(), osl::eval::ml::KingPieceRelative::index(), osl::rating::PinAttack::index(), osl::rating::ImmediateAddSupport::index(), osl::eval::ml::PtypeYY::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::KingPieceRelativeNoSupport::index(), osl::eval::ml::Pin::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::PiecePair::index(), osl::eval::ml::MajorY< Opening, MajorBasic >::index(), osl::eval::ml::RookRook::index(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::eval::ml::NonPawnAttacked::indexK(), osl::progress::ml::NewProgress::indexRelative(), osl::eval::ml::PawnDropBoth::indexX(), osl::eval::ml::PawnDropBoth::indexY(), osl::eval::ml::RookPawnY::indexY(), osl::SimpleState::initPawnMask(), osl::NumEffectState::inUnblockableCheck(), osl::SimpleState::isConsistent(), osl::NumEffectState::isConsistent(), osl::move_probability::BreakThreatmate::isDefendingKing8(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), isOnBoard(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::move_probability::MoveFromOpposingSliders::longPtype(), osl::checkmate::King8Info::make(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::rating::PinAttack::match(), osl::rating::RookDefense::match(), osl::move_probability::LongRecapture::match(), osl::move_probability::CoverFork::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::EscapeThreatened::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::book::MiniBoard::MiniBoard(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::mobility::MobilityTable::MobilityTable(), osl::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::operator<<(), osl::book::OPiece::OPiece(), osl::book::OSquare::OSquare(), osl::eval::ml::PinPtypeAll::pawnAttack(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::NumEffectState::pinnedCanMoveTo(), osl::NumEffectState::pinnedDir(), osl::progress::PtypeProgress::PtypeProgress(), osl::SimpleState::rotate180(), setSquare(), osl::ki2::show(), osl::record::myshogi::show(), osl::effect_action::StorePtypeOSquare::store(), osl::eval::ml::PiecePairKing::sub(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updatePawnFacing(), osl::move_probability::StateInfo::updatePinnedGenerals(), osl::eval::ml::PiecePair::value(), osl::eval::ml::PiecePair::value(), and osl::eval::ml::PiecePair::valueCompiled().
|
inline |
Definition at line 871 of file basic_type.h.
|
static |
Definition at line 801 of file basic_type.h.
Referenced by promoteWithMask().
|
static |
Definition at line 800 of file basic_type.h.
Referenced by promoteWithMask().
|
static |
Definition at line 799 of file basic_type.h.
Referenced by isPlayerBasicPtype(), isPlayerPtype(), isPtype(), osl::Move::newCapture(), ptype(), and ptypeO().
|
private |
Definition at line 789 of file basic_type.h.
Referenced by canMoveOn(), captured(), checkPromote(), intValue(), isEdge(), isEmpty(), isOnBoardByOwner(), isOnBoardNotPromoted(), isPiece(), isPlayerBasicPtype(), isPlayerPtype(), isPromoted(), isPtype(), number(), operator+=(), owner(), pieceIsBlack(), promote(), promoteWithMask(), ptype(), ptypeO(), setSquare(), square(), and unpromote().
|
static |
Definition at line 794 of file basic_type.h.
Referenced by osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::PieceEval::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::SimpleState::init(), osl::SimpleState::isConsistent(), osl::NumEffectState::isConsistent(), osl::NumEffectState::isConsistent(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::progress::ml::NewProgress::setUp(), osl::NumEffectState::showEffect(), and osl::progress::ml::NewProgress::updatePieceKingRelativeBonus().