My Project
|
#include <ptypeTable.h>
Public Member Functions | |
PtypeTable () | |
unsigned int | getShortMoveMask (Player p, PtypeO ptypeo, Direction dir) const |
mask_t | getMaskLow (Ptype ptype) const |
int | getIndex (Ptype) const |
bool | hasLongMove (Ptype ptype) const |
遅くて良い? | |
bool | isBetterToPromote (Ptype ptype) const |
int | getCanDropLimit (Player player, Ptype ptype) const |
bool | canDropTo (Player pl, Ptype ptype, Square pos) const |
const char * | getName (Ptype ptype) const |
const char * | getCsaName (Ptype ptype) const |
int | getMoveMask (Ptype ptype) const |
int | getIndexMin (Ptype ptype) const |
int | getIndexLimit (Ptype ptype) const |
const EffectContent | getEffect (PtypeO ptypeo, Square from, Square to) const |
fromにいるptypeoがtoに利きを持つか? | |
const EffectContent & | getEffect (PtypeO ptypeo, Offset32 offset32) const |
const EffectContent | getEffectNotLongU (PtypeO ptypeo, Square from, Square to) const |
ptypeo が,自分から offset のところに効きを持つか? U除く | |
bool | hasUnblockableEffect (PtypeO attacker, Square from, Square to) const |
Static Public Member Functions | |
static int | getKingIndex (Player p) |
Private Member Functions | |
template<Ptype T> | |
void | initPtypeSub (Int2Type< false > isBasic) |
template<Ptype T> | |
void | initPtypeSub (Int2Type< true > isBasic) |
template<Ptype T> | |
void | initPtype () |
void | init () |
EffectContent & | effect (PtypeO ptypeo, Offset32 offset32) |
Private Attributes | |
CArray< mask_t, PTYPE_SIZE > | numMaskLows |
CArray< int, PTYPE_SIZE > | numIndices |
CArray< const char *, PTYPE_SIZE > | names |
CArray< const char *, PTYPE_SIZE > | csaNames |
CArray< bool, PTYPE_SIZE > | betterToPromote |
CArray< int, PTYPE_SIZE > | moveMasks |
CArray< int, PTYPE_SIZE > | indexMins |
CArray< int, PTYPE_SIZE > | indexLimits |
CArray2d< int, 2, PTYPE_SIZE > | canDropLimit |
CArray2d< EffectContent, PTYPEO_SIZE, Offset32::SIZE > | effectTable |
CArray2d< EffectContent, PTYPEO_SIZE, Offset32::SIZE > | effectTableNotLongU |
CArray2d< unsigned int, 2, SHORT_DIRECTION_SIZE > | shortMoveMask |
Definition at line 15 of file ptypeTable.h.
osl::PtypeTable::PtypeTable | ( | ) |
Definition at line 6 of file ptypeTable.cc.
References osl::BLACK, osl::EffectContent::DIRECT(), effect(), getEffect(), init(), osl::newPtypeO(), osl::PPAWN, osl::ROOK, and osl::WHITE.
Definition at line 68 of file ptypeTable.h.
References osl::BLACK, getCanDropLimit(), osl::WHITE, and osl::Square::y().
Referenced by osl::effect_action::AlwaysMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), and osl::SimpleState::isValidMoveByRule().
|
inlineprivate |
Definition at line 123 of file ptypeTable.h.
References effectTable, osl::Offset32Base< Width, Width2 >::index(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.
Referenced by hasUnblockableEffect(), and PtypeTable().
Definition at line 62 of file ptypeTable.h.
References canDropLimit, osl::isPromoted(), osl::isValid(), and osl::playerToIndex().
Referenced by canDropTo().
|
inline |
Definition at line 80 of file ptypeTable.h.
References csaNames.
Referenced by osl::rating::LongTarget::name(), osl::rating::LongTarget2::name(), osl::rating::PinAttack::name(), osl::rating::Pattern::name(), osl::rating::PatternLong::name(), osl::rating::PatternLong2::name(), osl::rating::RelativeKingX::name(), osl::rating::RelativeKingY::name(), osl::rating::DropPtype::name(), osl::rating::DefenseKing8::name(), osl::rating::AttackKing8::name(), osl::rating::Chase::name(), osl::csa::show(), and osl::csa::strToPtype().
|
inline |
Definition at line 117 of file ptypeTable.h.
References effectTable, osl::Offset32Base< Width, Width2 >::index(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.
|
inline |
fromにいるptypeoがtoに利きを持つか?
ptypeo | - 駒の種類 |
from | - 駒の位置 |
to | - 利きをチェックするマスの位置 |
Definition at line 112 of file ptypeTable.h.
References getEffect(), and osl::Square::isOnBoard().
Referenced by osl::checkmate::Dfpn::attack(), osl::effect_util::AdditionalEffect::find(), osl::eval::See::findAdditionalPieces(), osl::checkmate::Dfpn::generateCheck(), getEffect(), osl::NumEffectState::hasEffectIf(), hasUnblockableEffect(), osl::checkmate::ImmediateCheckmateTable::ImmediateCheckmateTable(), osl::effect_util::SendOffSquare::Table::init(), osl::NumEffectState::inUnblockableCheck(), osl::SimpleState::isAlmostValidMove(), osl::move_probability::BreakThreatmate::isDefendingThreatmate(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::SimpleState::isValidMoveByRule(), and PtypeTable().
|
inline |
ptypeo が,自分から offset のところに効きを持つか? U除く
Definition at line 133 of file ptypeTable.h.
References effectTableNotLongU, osl::Offset32Base< Width, Width2 >::index(), osl::Square::isOnBoard(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.
|
inline |
Definition at line 50 of file ptypeTable.h.
Referenced by osl::rating::EscapePinGroup::findMatch(), osl::rating::EscapePin::match(), osl::NumEffectState::prologueDrop(), and osl::ki2::show().
|
inline |
Definition at line 93 of file ptypeTable.h.
References indexLimits, and osl::isBasic().
Referenced by osl::PieceStand::canAdd(), osl::eval::ml::PtypeCountXY::setUp(), osl::eval::ml::PtypeCountXYAttack::setUp(), and osl::eval::ml::PieceStandY::setUp().
|
inline |
Definition at line 88 of file ptypeTable.h.
References indexMins, and osl::isBasic().
Referenced by osl::PieceStand::canAdd(), osl::eval::ml::PieceStand::eval(), osl::eval::ml::PieceStand::evalWithUpdate(), hasLongMove(), osl::eval::ml::NonPawnPieceStandTurn::index(), osl::eval::ml::PieceStandY::index(), osl::eval::ml::PtypeCount::indexBoardCount(), osl::eval::ml::PtypeCount::indexBoardCountX(), osl::eval::ml::PtypeCount::indexBoardCountY(), osl::eval::ml::PtypeCount::indexCount(), osl::eval::ml::PtypeCount::indexCountX(), osl::eval::ml::PtypeCount::indexCountY(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::progress::ml::NewProgress::NewProgress(), osl::eval::ml::PtypeCountXY::setUp(), osl::eval::ml::PtypeCountXYAttack::setUp(), osl::eval::ml::PieceStandY::setUp(), and osl::progress::ml::NewProgress::updateMain().
|
inlinestatic |
Definition at line 98 of file ptypeTable.h.
References osl::BLACK, and osl::isValid().
|
inline |
Definition at line 46 of file ptypeTable.h.
References numMaskLows.
Referenced by osl::SimpleState::countPiecesOnStandBit(), osl::rating::EscapePinGroup::findMatch(), osl::rating::EscapePin::match(), and osl::NumEffectState::prologueDrop().
|
inline |
Definition at line 84 of file ptypeTable.h.
References moveMasks.
Referenced by osl::effect::EffectedNumTable::EffectedNumTable(), osl::checkmate::ImmediateCheckmateTable::ImmediateCheckmateTable(), osl::checkmate::ProofNumberTable::init(), osl::effect_util::Neighboring8Direct::Table::init(), osl::move_probability::AddEffectLong::match(), osl::mobility::MobilityTable::MobilityTable(), and osl::move_probability::StateInfo::updatePinnedGenerals().
|
inline |
|
inline |
Definition at line 41 of file ptypeTable.h.
References osl::playerToIndex(), osl::PTYPEO_MIN, and shortMoveMask.
|
inline |
遅くて良い?
Definition at line 54 of file ptypeTable.h.
References getIndexMin(), and osl::unpromote().
Referenced by osl::checkmate::OracleAdjust::attack(), osl::effect_util::Neighboring8Direct::Table::findNearest(), osl::effect_util::Neighboring8Direct::Table::hasEffect(), osl::effect_util::Neighboring8Direct::hasEffectNaive(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), and osl::rating::ImmediateAddSupport::index().
Definition at line 140 of file ptypeTable.h.
References effect(), getEffect(), and osl::EffectContent::hasUnblockableEffect().
|
private |
Definition at line 53 of file ptypeTable.cc.
References osl::BLACK, osl::Board_Table, osl::EffectContent::DIRECT(), osl::DIRECTION_MAX, osl::DIRECTION_MIN, osl::BoardTable::getDxForBlack(), osl::BoardTable::getDyForBlack(), osl::Offset32Base< Width, Width2 >::index(), osl::isLong(), osl::LONG_U, osl::newOffset(), osl::newPtypeO(), osl::PTYPE_MAX, osl::PTYPE_MIN, osl::PTYPEO_MIN, osl::ROOK, and osl::WHITE.
Referenced by PtypeTable().
|
private |
Definition at line 48 of file ptypeTable.cc.
|
private |
Definition at line 39 of file ptypeTable.cc.
|
private |
黒
白
Definition at line 21 of file ptypeTable.cc.
References osl::canPromote(), osl::promote(), and osl::Square::reverseY().
|
inline |
Definition at line 58 of file ptypeTable.h.
References betterToPromote.
Referenced by osl::ShouldPromoteCut::canIgnore(), osl::effect_action::BetterToPromote< Action >::doAction(), and osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe().
|
private |
Definition at line 22 of file ptypeTable.h.
Referenced by isBetterToPromote().
|
private |
Definition at line 27 of file ptypeTable.h.
Referenced by getCanDropLimit().
|
private |
Definition at line 21 of file ptypeTable.h.
Referenced by getCsaName().
|
private |
Definition at line 29 of file ptypeTable.h.
Referenced by effect(), and getEffect().
|
private |
Definition at line 30 of file ptypeTable.h.
Referenced by getEffectNotLongU().
|
private |
Definition at line 25 of file ptypeTable.h.
Referenced by getIndexLimit().
|
private |
Definition at line 24 of file ptypeTable.h.
Referenced by getIndexMin().
|
private |
Definition at line 23 of file ptypeTable.h.
Referenced by getMoveMask().
|
private |
Definition at line 20 of file ptypeTable.h.
Referenced by getName().
|
private |
Definition at line 19 of file ptypeTable.h.
|
private |
Definition at line 18 of file ptypeTable.h.
Referenced by getMaskLow().
|
private |
Definition at line 31 of file ptypeTable.h.
Referenced by getShortMoveMask().