My Project
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::Square Class Reference

#include <basic_type.h>

Public Types

enum  { PIECE_STAND =0 , MIN =0 , SIZE =0x100 }
 

Public Member Functions

unsigned int uintValue () const
 
 Square ()
 
 Square (int x, int y)
 
int x () const
 将棋としてのX座標を返す.
 
int y () const
 将棋としてのY座標を返す.
 
int y1 () const
 y+1を返す
 
unsigned int index () const
 
int indexForOffset32 () const
 
bool isPieceStand () const
 
bool isOnBoardSlow () const
 
bool isOnBoard () const
 盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する.
 
bool isEdge () const
 onBoardから8近傍のオフセットを足した点がedgeかどうかの判定 そこそこ速くなった.
 
bool isValid () const
 
const Square squareForBlack (Player player) const
 
template<Player P>
const Square squareForBlack () const
 後手の場合は盤面を引っくり返す.
 
const Square rotate180 () const
 
const Square rotate180EdgeOK () const
 
const Square rotate180Safe () const
 
const Square flipHorizontal () const
 
bool isOnBoardRegion () const
 squareがONBOARD_MINとONBOARD_MAXの間にある
 
Squareoperator++ ()
 
template<Player P>
bool canPromote () const
 
bool canPromote (Player player) const
 
bool isULRD (Square sq) const
 2つのSquare(onBoardであることが前提)が, xが等しいかyが等しい
 
bool isUD (Square sq) const
 2つのSquare(onBoardであることが前提)のxが等しい
 
template<Player P>
bool isU (Square sq) const
 sqがPlayer Pにとって上
 
bool isLR (Square sq) const
 2つのSquare(onBoardであることが前提)のyが等しい
 
Squareoperator+= (Offset offset)
 
Squareoperator-= (Offset offset)
 
const Square operator+ (Offset offset) const
 
const Square operator- (Offset offset) const
 
const Offset operator- (Square other) const
 
template<int Y>
bool yEq ()
 
template<int Y>
std::enable_if< Y!=2, bool >::type yLe ()
 
template<int Y>
std::enable_if< Y==2, bool >::type yLe ()
 
template<int Y>
std::enable_if< Y!=7, bool >::type yGe ()
 
template<int Y>
std::enable_if< Y==7, bool >::type yGe ()
 
template<Player P, Direction D>
const Square neighbor () const
 
template<Player P, Direction D>
const Square back () const
 
const Square neighbor (Player P, Direction D) const
 
const Square back (Player P, Direction D) const
 
bool isNeighboring8 (Square to) const
 

Static Public Member Functions

static const Square makeDirect (int value)
 
static const Square STAND ()
 
static const Square makeNoCheck (int x, int y)
 assertなしに作る
 
static const Square nth (unsigned int i)
 
static unsigned int indexMax ()
 
static const Square onBoardMax ()
 
static const Square onBoardMin ()
 
static int reverseX (int x)
 
static int reverseY (int y)
 
template<Player P>
static bool canPromoteY (int y)
 

Private Member Functions

 Square (int p)
 

Private Attributes

unsigned int square
 

Detailed Description

Definition at line 531 of file basic_type.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PIECE_STAND 
MIN 
SIZE 

Definition at line 540 of file basic_type.h.

Constructor & Destructor Documentation

◆ Square() [1/3]

osl::Square::Square ( int  p)
inlineexplicitprivate

Definition at line 534 of file basic_type.h.

◆ Square() [2/3]

osl::Square::Square ( )
inline

◆ Square() [3/3]

osl::Square::Square ( int  x,
int  y 
)
inline

Definition at line 549 of file basic_type.h.

References SIZE, and square.

Member Function Documentation

◆ back() [1/2]

template<Player P, Direction D>
const Square osl::Square::back ( ) const
inline

Definition at line 750 of file basic_type.h.

Referenced by osl::eval::ml::KnightFork::accumulate().

◆ back() [2/2]

const osl::Square osl::Square::back ( Player  P,
Direction  D 
) const

Definition at line 196 of file basic_type.cc.

References osl::alt(), osl::Board_Table, osl::D, and osl::BoardTable::nextSquare().

◆ canPromote() [1/2]

template<Player P>
bool osl::Square::canPromote ( ) const
inline

Definition at line 659 of file basic_type.h.

References canPromote().

Referenced by osl::eval::ml::MajorCheckWithCapture::addOne(), osl::ShouldPromoteCut::canIgnore(), canPromote(), osl::eval::See::computeValue(), 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::checkmate::PawnCheckmateMoves::effectiveOnlyIfPawnCheckmate(), osl::checkmate::PawnCheckmateMoves::effectiveOnlyIfPawnCheckmate(), osl::eval::ml::RookPawn< Opening >::eval(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::Move::ignoreUnpromote(), osl::rating::Karanari::index(), osl::rating::LongTarget::isPromotable(), osl::SimpleState::isValidMoveByRule(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::progress::Effect5x3WithBonus::makeProgressAreaBonus(), osl::rating::Karanari::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::PatternBase< TestPromotable >::match(), osl::move_probability::DropAfterOpposingPawn::match(), osl::move_probability::SeeFeature::match(), osl::rating::Karanari::matchGeneral(), osl::eval::ml::SilverFork::matchGold(), osl::move_probability::PawnAttack::matchPtype(), osl::eval::ml::SilverFork::matchRook(), osl::ki2::show(), osl::psn::showXP(), and osl::move_probability::PatternCommon::updateCacheOne().

◆ canPromote() [2/2]

bool osl::Square::canPromote ( Player  player) const
inline

Definition at line 662 of file basic_type.h.

References osl::BLACK, and uintValue().

◆ canPromoteY()

template<Player P>
static bool osl::Square::canPromoteY ( int  y)
inlinestatic

Definition at line 655 of file basic_type.h.

References osl::BLACK.

◆ flipHorizontal()

const Square osl::Square::flipHorizontal ( ) const
inline

◆ index()

unsigned int osl::Square::index ( ) const
inline

Definition at line 572 of file basic_type.h.

References MIN, and square.

Referenced by osl::hash::HashGenTable::addHashKey(), osl::move_probability::PatternCommon::addOne(), osl::move_probability::BishopAttack::addSquare(), osl::Centering5x3::adjustCenter(), osl::Centering3x3::adjustCenter(), osl::container::BoardMaskTable3x3::BoardMaskTable3x3(), osl::container::BoardMaskTable5x3Center::BoardMaskTable5x3Center(), osl::container::BoardMaskTable5x5::BoardMaskTable5x5(), osl::SquareCompressor::compress(), osl::NumEffectState::copyFrom(), osl::effect::NumSimpleEffectTable::copyFrom(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::NumSimpleEffectTable::doEffectLong(), osl::effect::NumSimpleEffectTable::doEffectShort(), osl::effect::NumSimpleEffectTable::effectSetAt(), osl::rating::PatternGroup::findMatch(), osl::PathEncodingTable::get(), osl::progress::Effect5x3Table::getAttackEffect(), osl::progress::Effect5x3Table::getDefenseEffect(), osl::SimpleState::getPiecePtr(), osl::container::BoardMask::index(), osl::Centering3x3::Table::init(), osl::checkmate::EdgeTable::init(), osl::progress::PtypeProgressTable::init(), osl::SquareCompressor::Initializer::Initializer(), isOnBoardRegion(), osl::container::BoardMaskTable5x5::mask(), osl::container::BoardMaskTable3x3::mask(), osl::container::BoardMaskTable5x3Center::mask(), osl::move_probability::BreakThreatmate::match(), osl::move_probability::LanceAttack::match(), osl::move_probability::operator==(), osl::rating::PatternGroup::PatternGroup(), osl::SimpleState::pieceAt(), osl::progress::PtypeProgressTable::progress(), osl::checkmate::EdgeTable::resetEdgeFromLiberty(), osl::SimpleState::setBoard(), osl::progress::Effect5x3Table::setupAttackEffect(), osl::progress::Effect5x3Table::setupDefenseEffect(), osl::hash::HashGenTable::subHashKey(), osl::Centering5x3::Table::Table(), and osl::move_probability::PatternCommon::updateCacheOne().

◆ indexForOffset32()

int osl::Square::indexForOffset32 ( ) const
inline

Definition at line 574 of file basic_type.h.

References square.

◆ indexMax()

static unsigned int osl::Square::indexMax ( )
inlinestatic

Definition at line 573 of file basic_type.h.

References MIN, and SIZE.

◆ isEdge()

bool osl::Square::isEdge ( ) const
inline

◆ isLR()

bool osl::Square::isLR ( Square  sq) const
inline

2つのSquare(onBoardであることが前提)のyが等しい

Definition at line 701 of file basic_type.h.

References isOnBoard(), and uintValue().

◆ isNeighboring8()

bool osl::Square::isNeighboring8 ( Square  to) const

◆ isOnBoard()

bool osl::Square::isOnBoard ( ) const
inline

盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する.

Definition at line 583 of file basic_type.h.

References square.

Referenced by osl::eval::ml::KnightCheck::canCheck(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::NumEffectState::countEffect(), osl::NumEffectState::countEffect(), osl::mobility::countMobilityBoth(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::PawnPtypeOPtypeO::evalWithUpdate(), osl::move_probability::ToEffect::find(), osl::progress::Effect5x3Table::getAttackEffect(), osl::progress::Effect5x3Table::getDefenseEffect(), osl::PtypeTable::getEffect(), osl::PtypeTable::getEffectNotLongU(), osl::BoardTable::getShort8(), osl::BoardTable::getShort8(), osl::effect_util::Neighboring8Direct::Table::hasEffect(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectByNotPinned(), osl::NumEffectState::hasEffectByNotPinnedAndKing(), osl::NumEffectState::hasEffectByPiece(), osl::effect_util::Neighboring8Direct::hasEffectFromTo(), osl::eval::ml::BishopExchangeSilverKing::indexRook(), osl::SimpleState::isConsistent(), osl::SimpleState::isEmptyBetween(), osl::SimpleState::isEmptyBetween(), isLR(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), isU(), isUD(), isULRD(), osl::Move::isValid(), osl::Move::Move(), osl::Move::Move(), osl::rating::PatternLong::nextPieceOrEnd(), osl::BoardTable::nextSquare(), osl::eval::ml::PinPtypeAll::pawnAttack(), osl::SimpleState::pieceOnBoard(), and osl::eval::ml::PiecePair::sanitize().

◆ isOnBoardRegion()

bool osl::Square::isOnBoardRegion ( ) const
inline

squareがONBOARD_MINとONBOARD_MAXの間にある

Definition at line 641 of file basic_type.h.

References index(), onBoardMax(), and onBoardMin().

Referenced by osl::move_probability::PatternCommon::addOne().

◆ isOnBoardSlow()

bool osl::Square::isOnBoardSlow ( ) const

Definition at line 178 of file basic_type.cc.

◆ isPieceStand()

bool osl::Square::isPieceStand ( ) const
inline

Definition at line 576 of file basic_type.h.

References PIECE_STAND, and square.

Referenced by osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::checkmate::LibertyEstimator::attackH(), osl::checkmate::attackProofCost(), osl::ShouldPromoteCut::canIgnore(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::PiecePair::evalWithUpdate(), osl::eval::ml::PiecePair::evalWithUpdateCompiled(), osl::eval::ml::BishopRookFork::findDropInLine(), osl::rating::AttackKing8Group::findMatch(), flipHorizontal(), osl::NumEffectState::inCheck(), osl::rating::CountOpen::index(), osl::eval::ml::PiecePair::index(), osl::SimpleState::initPawnMask(), osl::NumEffectState::isAlmostValidMove(), osl::SimpleState::isAlmostValidMove(), osl::SimpleState::isConsistent(), osl::Move::isDrop(), isEdge(), osl::move_classifier::Check< P >::isMember(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), osl::move_classifier::SafeMove< P >::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::Piece::isOnBoard(), osl::SimpleState::isValidMoveByRule(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::NumEffectState::makeMove(), osl::NumEffectState::makePinOpen(), osl::NumEffectState::makeUnmakeMove(), osl::rating::RookDefense::match(), osl::move_probability::MoveFromOpposingSliders::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::book::OMove::OMove(), osl::operator<<(), osl::operator<<(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::book::OPiece::position2Bits(), osl::NumEffectState::recalcPinOpen(), rotate180Safe(), osl::eval::See::seeInternal(), osl::SimpleState::setPiece(), osl::ki2::show(), osl::psn::show(), osl::ki2::show(), osl::csa::show(), osl::psn::showXP(), osl::kakinoki::strToMove(), and osl::eval::ml::PiecePair::valueCompiled().

◆ isU()

template<Player P>
bool osl::Square::isU ( Square  sq) const
inline

sqがPlayer Pにとって上

Definition at line 690 of file basic_type.h.

References osl::BLACK, isOnBoard(), and uintValue().

◆ isUD()

bool osl::Square::isUD ( Square  sq) const
inline

2つのSquare(onBoardであることが前提)のxが等しい

Definition at line 681 of file basic_type.h.

References isOnBoard(), and uintValue().

◆ isULRD()

bool osl::Square::isULRD ( Square  sq) const
inline

2つのSquare(onBoardであることが前提)が, xが等しいかyが等しい

Definition at line 673 of file basic_type.h.

References isOnBoard(), and uintValue().

◆ isValid()

bool osl::Square::isValid ( ) const

◆ makeDirect()

static const Square osl::Square::makeDirect ( int  value)
inlinestatic

◆ makeNoCheck()

static const Square osl::Square::makeNoCheck ( int  x,
int  y 
)
inlinestatic

assertなしに作る

Definition at line 556 of file basic_type.h.

References osl::Offset::BOARD_HEIGHT, Square(), x(), and y().

◆ neighbor() [1/2]

template<Player P, Direction D>
const Square osl::Square::neighbor ( ) const
inline

◆ neighbor() [2/2]

const osl::Square osl::Square::neighbor ( Player  P,
Direction  D 
) const

Definition at line 190 of file basic_type.cc.

References osl::Board_Table, osl::D, and osl::BoardTable::nextSquare().

◆ nth()

static const Square osl::Square::nth ( unsigned int  i)
inlinestatic

Definition at line 559 of file basic_type.h.

References MIN, and Square().

Referenced by osl::SimpleState::init().

◆ onBoardMax()

static const Square osl::Square::onBoardMax ( )
inlinestatic

Definition at line 635 of file basic_type.h.

References Square().

Referenced by isOnBoardRegion().

◆ onBoardMin()

static const Square osl::Square::onBoardMin ( )
inlinestatic

Definition at line 636 of file basic_type.h.

References Square().

Referenced by isOnBoardRegion().

◆ operator+()

const Square osl::Square::operator+ ( Offset  offset) const
inline

Definition at line 714 of file basic_type.h.

◆ operator++()

Square & osl::Square::operator++ ( )
inline

Definition at line 646 of file basic_type.h.

References square.

◆ operator+=()

Square & osl::Square::operator+= ( Offset  offset)
inline

Definition at line 706 of file basic_type.h.

References osl::Offset::intValue(), and square.

◆ operator-() [1/2]

const Square osl::Square::operator- ( Offset  offset) const
inline

Definition at line 718 of file basic_type.h.

◆ operator-() [2/2]

const Offset osl::Square::operator- ( Square  other) const
inline

Definition at line 722 of file basic_type.h.

References osl::Offset::makeDirect(), and square.

◆ operator-=()

Square & osl::Square::operator-= ( Offset  offset)
inline

Definition at line 710 of file basic_type.h.

References osl::Offset::intValue(), and square.

◆ reverseX()

static int osl::Square::reverseX ( int  x)
inlinestatic

Definition at line 651 of file basic_type.h.

References x().

◆ reverseY()

static int osl::Square::reverseY ( int  y)
inlinestatic

◆ rotate180()

const Square osl::Square::rotate180 ( ) const
inline

◆ rotate180EdgeOK()

const Square osl::Square::rotate180EdgeOK ( ) const
inline

◆ rotate180Safe()

const Square osl::Square::rotate180Safe ( ) const
inline

Definition at line 622 of file basic_type.h.

References isPieceStand().

Referenced by osl::SimpleState::rotate180().

◆ squareForBlack() [1/2]

template<Player P>
const Square osl::Square::squareForBlack ( ) const
inline

後手の場合は盤面を引っくり返す.

PIECE_STANDの場合は扱えない.

Definition at line 609 of file basic_type.h.

References squareForBlack().

Referenced by squareForBlack().

◆ squareForBlack() [2/2]

const Square osl::Square::squareForBlack ( Player  player) const
inline

◆ STAND()

static const Square osl::Square::STAND ( )
inlinestatic

◆ uintValue()

unsigned int osl::Square::uintValue ( ) const
inline

◆ x()

int osl::Square::x ( ) const
inline

将棋としてのX座標を返す.

Squareの内部表現に依存しない.

Definition at line 563 of file basic_type.h.

References square.

Referenced by osl::move_probability::King5x5Ptype::addOne(), osl::eval::ml::RookMobilityAll::adjust(), osl::eval::ml::PiecePair::adjust12(), osl::Centering5x3::adjustCenterNaive(), osl::Centering3x3::adjustCenterNaive(), osl::rating::BadLance::basicMatch(), osl::container::BoardMaskTable5x3Center::BoardMaskTable5x3Center(), osl::container::BitXmask::clear(), osl::record::KisenUtils::convertSquare(), osl::rating::DefenseKing8::count(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::mobility::RookMobility::countHorizontalAll(), osl::effect::NumSimpleEffectTable::doEffectLong(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookPromoteDefense::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::KnightHead::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::AnagumaEmpty::evalOne(), osl::eval::ml::KingMobility::evalOne(), osl::eval::ml::KingMobilitySum::evalOne(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::King25EffectEach< Stage >::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::King25BothSide::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::King25EffectEachBoth::evalOne(), osl::eval::ml::RookEffectBase::evalOne(), osl::eval::ml::King3Pieces::evalWithUpdate(), osl::eval::ml::PawnPtypeOPtypeO::evalWithUpdate(), osl::eval::ml::PawnDropBoth::evalWithUpdate(), osl::eval::ml::King25EmptyAbs< Opening >::evalWithUpdate(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::ml::PiecePair::evalWithUpdateCompiled(), flipHorizontal(), osl::move_probability::SquareX::fromTo(), osl::BoardTable::getShort8(), osl::BoardTable::getShort8(), osl::effect_util::Neighboring8Direct::hasEffectNaive(), osl::eval::ml::KingPieceRelative::index(), osl::eval::ml::King25EffectEach< Stage >::index(), osl::eval::ml::KingPieceRelativeNoSupport::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::KingXBothBlocked::index(), osl::eval::ml::KingXBlocked3::index(), osl::eval::ml::Pin::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::GoldAndSilverNearKing::index(), osl::eval::ml::PawnDropBoth::index(), osl::eval::ml::PiecePair::index(), osl::eval::ml::LanceEffectPieceKingRelative::index(), osl::eval::ml::KingXBlockedBase::index(), osl::eval::ml::KingXBlockedYBase::index(), osl::eval::ml::AnagumaEmpty::index(), osl::eval::ml::King25EmptyAbs< Opening >::index(), osl::progress::ml::NewProgress::index(), osl::eval::ml::RookEffectBase::index1(), osl::eval::ml::BishopEffectBase::index1(), osl::eval::ml::RookEffectBase::index2(), osl::eval::ml::BishopEffectBase::index2(), osl::eval::ml::GoldAndSilverNearKing::indexCombination(), osl::eval::ml::NonPawnAttacked::indexK(), osl::rating::BigramAttack::indexKing(), osl::eval::ml::PiecePairKing::indexKing(), osl::eval::ml::BishopExchangeSilverKing::indexKing(), osl::rating::BigramAttack::indexOfMove(), osl::progress::ml::NewProgress::indexPerEffect(), osl::progress::ml::NewProgress::indexPerEffectX(), osl::progress::ml::NewProgress::indexPerEffectY(), osl::progress::ml::NewProgress::indexRelative(), osl::eval::ml::BishopExchangeSilverKing::indexRook(), osl::eval::ml::GoldFeatures::indexSideX(), osl::eval::ml::BishopExchangeSilverKing::indexSilver(), osl::eval::ml::PiecePairKing::indexWhite(), osl::eval::ml::PawnDropBoth::indexX(), osl::eval::ml::King3Pieces::indexX(), osl::eval::ml::King25Mobility::indexX(), osl::eval::ml::King25BothSide::indexX(), osl::progress::ml::NewProgress::indexX(), osl::eval::ml::RookMobilityAll::indexX(), osl::eval::ml::RookMobilityAll::indexXKingX(), osl::eval::ml::PawnDropBoth::indexY(), osl::eval::ml::KingXBothBlocked::indexY(), osl::eval::ml::KingXBlocked3::indexY(), osl::eval::ml::RookPawnY::indexY(), osl::progress::ml::NewProgress::indexY(), osl::checkmate::EdgeTable::init(), osl::SimpleState::initPawnMask(), osl::eval::ml::BishopRookFork::isBishopForkSquare(), osl::eval::ml::KingXBlockedBase::isBlocked(), isEdge(), osl::eval::ml::BishopRookFork::isRookForkSquare(), osl::rating::Threatmate::knight2Step(), makeNoCheck(), osl::rating::RelativeKingX::makeOldX(), osl::progress::Effect5x3d::makeProgress(), osl::progress::Effect5x3::makeProgressArea(), osl::progress::Effect5x3WithBonus::makeProgressAreaBonus(), osl::rating::RelativeKingX::makeX(), osl::rating::SquareX::makeX(), osl::rating::PawnAttack::match(), osl::rating::RookDefense::match(), osl::move_probability::KingBlockade::match(), osl::move_probability::SquareX::match(), osl::move_probability::KingRelativeX::match(), osl::move_probability::OpposingPawn::match(), osl::move_probability::DropAfterOpposingPawn::match(), osl::move_probability::PawnAttack::match(), osl::move_probability::LanceAttack::match(), osl::move_probability::RookAttack::match(), osl::eval::ml::KingMobility::mobilityDir(), osl::Offset32Base< Width, Width2 >::Offset32Base(), osl::book::OMove::OMove(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::book::opiece_sort::operator()(), osl::book::oposition_sort::operator()(), osl::operator<<(), osl::eval::ml::PinPtypeAll::pawnAttack(), osl::book::OPiece::position2Bits(), osl::progress::ml::NewProgress::progressOne(), reverseX(), osl::record::KanjiMove::selectCandidates(), osl::container::BitXmask::set(), osl::progress::ml::NewProgress::setUp(), osl::progress::Effect5x3Table::setupAttackEffect(), osl::progress::Effect5x3Table::setupDefenseEffect(), osl::record::myshogi::show(), osl::ki2::show(), osl::psn::show(), osl::ki2::show(), osl::record::myshogi::show(), osl::csa::show(), osl::eval::ml::PiecePair::sum12(), osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::eval::ml::KnightFork::updateSquares(), osl::eval::ml::OpenMidEndingEval::updateSub(), and osl::eval::ml::PiecePair::valueCompiled().

◆ y()

int osl::Square::y ( ) const
inline

将棋としてのY座標を返す.

Squareの内部表現に依存しない.

Definition at line 567 of file basic_type.h.

References square.

Referenced by osl::eval::ml::PiecePairKing::add(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::King5x5Ptype::addOne(), osl::eval::ml::PiecePairKing::addSub(), osl::eval::ml::PiecePair::adjust12(), osl::Centering5x3::adjustCenterNaive(), osl::Centering3x3::adjustCenterNaive(), osl::container::BoardMaskTable5x3Center::BoardMaskTable5x3Center(), osl::enter_king::EnterKing::canDeclareWin(), osl::enter_king::EnterKing::canDeclareWin(), osl::PtypeTable::canDropTo(), osl::PtypePlayerTraits< T, P >::canDropTo(), osl::ShouldPromoteCut::canIgnore(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::record::KisenUtils::convertSquare(), osl::mobility::BishopMobility::countAll(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::mobility::RookMobility::countVerticalAll(), osl::eval::ml::OpenMidEndingEval::debugInfo(), osl::effect::NumSimpleEffectTable::doEffectLong(), osl::eval::ml::RookPromoteDefense::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::KnightCheck::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::King25EffectY::eval(), osl::eval::ml::King25EffectY2::eval(), osl::eval::ml::King25EffectYAttack::eval(), osl::eval::ml::King25EffectYDefense::eval(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::AnagumaEmpty::evalOne(), osl::eval::ml::KingMobility::evalOne(), osl::eval::ml::KingMobilitySum::evalOne(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::King25EffectEach< Stage >::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::King25BothSide::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::King25EffectEachBoth::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::RookEffectBase::evalOne(), osl::eval::ml::King8EffectEmptySquare< false >::evalWithUpdate(), osl::eval::ml::King3Pieces::evalWithUpdate(), osl::eval::ml::PawnPtypeOPtypeO::evalWithUpdate(), osl::eval::ml::PtypeYY::evalWithUpdate(), osl::eval::ml::King25EmptyAbs< Opening >::evalWithUpdate(), osl::eval::ml::PiecePairKing::evalWithUpdateBang(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::ml::PiecePair::evalWithUpdateCompiled(), flipHorizontal(), osl::move_probability::SquareY::fromTo(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::BoardTable::getShort8(), osl::BoardTable::getShort8(), osl::effect_util::Neighboring8Direct::hasEffectNaive(), osl::Move::hasIgnoredUnpromote(), osl::Move::ignoreUnpromote(), osl::eval::ml::KingPieceRelative::index(), osl::eval::ml::King25EffectEach< Stage >::index(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::KingPieceRelativeNoSupport::index(), osl::eval::ml::PtypeYY::index(), osl::eval::ml::Pin::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::GoldAndSilverNearKing::index(), osl::eval::ml::PieceStandY::index(), osl::eval::ml::PiecePair::index(), osl::eval::ml::MajorY< Opening, MajorBasic >::index(), osl::eval::ml::RookRook::index(), osl::eval::ml::PawnAdvanceUtil::index(), osl::eval::ml::KnightAdvance::index(), osl::eval::ml::LanceEffectPieceKingRelative::index(), osl::eval::ml::PieceStandY::index(), osl::eval::ml::KingXBlockedYBase::index(), osl::eval::ml::AnagumaEmpty::index(), osl::eval::ml::King25EmptyAbs< Opening >::index(), osl::progress::ml::NewProgress::index(), osl::eval::ml::RookEffectBase::index1(), osl::eval::ml::BishopEffectBase::index1(), osl::eval::ml::RookEffectBase::index2(), osl::eval::ml::BishopEffectBase::index2(), osl::eval::ml::GoldAndSilverNearKing::indexCombination(), osl::eval::ml::NonPawnAttacked::indexK(), osl::rating::BigramAttack::indexKing(), osl::eval::ml::PiecePairKing::indexKing(), osl::eval::ml::BishopExchangeSilverKing::indexKing(), osl::rating::BigramAttack::indexOfMove(), osl::progress::ml::NewProgress::indexPerEffect(), osl::progress::ml::NewProgress::indexPerEffectX(), osl::progress::ml::NewProgress::indexPerEffectY(), osl::eval::ml::PiecePairKing::indexPiece(), osl::progress::ml::NewProgress::indexRelative(), osl::eval::ml::SilverFeatures::indexRetreat(), osl::eval::ml::GoldFeatures::indexRetreat(), osl::eval::ml::BishopExchangeSilverKing::indexRook(), osl::eval::ml::GoldFeatures::indexSideY(), osl::eval::ml::BishopExchangeSilverKing::indexSilver(), osl::eval::ml::PiecePairKing::indexWhite(), osl::progress::ml::NewProgress::indexX(), osl::eval::ml::PawnDropBoth::indexY(), osl::eval::ml::KingXBothBlocked::indexY(), osl::eval::ml::KingXBlocked3::indexY(), osl::eval::ml::RookPawnY::indexY(), osl::eval::ml::PromotedMinorPieces::indexY(), osl::eval::ml::King3Pieces::indexY(), osl::eval::ml::King25BothSide::indexY(), osl::eval::ml::King25Mobility::indexY(), osl::progress::ml::NewProgress::indexY(), osl::eval::ml::RookMobilityAll::indexY(), osl::checkmate::EdgeTable::init(), osl::eval::ml::BishopRookFork::isBishopForkSquare(), osl::eval::ml::KingXBlockedBase::isBlocked(), osl::SimpleState::isConsistent(), isEdge(), osl::eval::ml::BishopRookFork::isRookForkSquare(), osl::rating::Threatmate::knight2Step(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), makeNoCheck(), osl::rating::RelativeKingY::makeOldY(), osl::progress::Effect5x3d::makeProgress(), osl::progress::Effect5x3::makeProgressArea(), osl::progress::Effect5x3WithBonus::makeProgressAreaBonus(), osl::rating::RelativeKingY::makeY(), osl::rating::SquareY::makeY(), osl::rating::RookDefense::match(), osl::move_probability::SquareY::match(), osl::move_probability::KingRelativeY::match(), osl::move_probability::LanceAttack::match(), osl::move_probability::PawnAttack::matchPtype(), osl::PtypePlayerTraits< T, P >::mayPromote(), osl::eval::ml::KingMobility::mobilityDir(), osl::Offset32Base< Width, Width2 >::Offset32Base(), osl::book::OMove::OMove(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::book::opiece_sort::operator()(), osl::book::oposition_sort::operator()(), osl::operator<<(), osl::book::OPiece::position2Bits(), osl::progress::ml::NewProgress::progressOne(), reverseY(), osl::record::KanjiMove::selectCandidates(), osl::progress::ml::NewProgress::setUp(), osl::progress::Effect5x3Table::setupAttackEffect(), osl::progress::Effect5x3Table::setupDefenseEffect(), osl::record::myshogi::show(), osl::ki2::show(), osl::psn::show(), osl::ki2::show(), osl::record::myshogi::show(), osl::csa::show(), osl::move_probability::CheckFeature::sign(), osl::eval::ml::PiecePairKing::sub(), osl::eval::ml::PiecePair::sum12(), osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::eval::ml::KnightFork::updateSquares(), osl::eval::ml::OpenMidEndingEval::updateSub(), and osl::eval::ml::PiecePair::valueCompiled().

◆ y1()

int osl::Square::y1 ( ) const
inline

y+1を返す

Definition at line 571 of file basic_type.h.

References square.

◆ yEq()

template<int Y>
bool osl::Square::yEq ( )
inline

◆ yGe() [1/2]

template<int Y>
std::enable_if< Y!=7, bool >::type osl::Square::yGe ( )
inline

◆ yGe() [2/2]

template<int Y>
std::enable_if< Y==7, bool >::type osl::Square::yGe ( )
inline

Definition at line 742 of file basic_type.h.

References uintValue().

◆ yLe() [1/2]

template<int Y>
std::enable_if< Y!=2, bool >::type osl::Square::yLe ( )
inline

◆ yLe() [2/2]

template<int Y>
std::enable_if< Y==2, bool >::type osl::Square::yLe ( )
inline

Definition at line 734 of file basic_type.h.

References uintValue().

Member Data Documentation

◆ square

unsigned int osl::Square::square
private

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