All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
osl::PtypeTable Class Reference

#include <ptypeTable.h>

Collaboration diagram for osl::PtypeTable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PtypeTable ()
unsigned int getShortMoveMask (Player p, PtypeO ptypeo, Direction dir) const
mask_t getMaskLow (Ptype 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 EffectContentgetEffect (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 ()
bool canDropTo (Ptype ptype, Square pos, Int2Type< BLACK >) const
bool canDropTo (Ptype ptype, Square pos, Int2Type< WHITE >) const
EffectContenteffect (PtypeO ptypeo, Offset32 offset32)

Private Attributes

CArray< mask_t, PTYPE_SIZEnumMaskLows
CArray< int, PTYPE_SIZEnumIndices
CArray< const char *, PTYPE_SIZEnames
CArray< const char *, PTYPE_SIZEcsaNames
CArray< bool, PTYPE_SIZEbetterToPromote
CArray< int, PTYPE_SIZEmoveMasks
CArray< int, PTYPE_SIZEindexMins
CArray< int, PTYPE_SIZEindexLimits
CArray2d< int, 2, PTYPE_SIZEcanDropLimit
CArray2d< EffectContent,
PTYPEO_SIZE, Offset32::SIZE
effectTable
CArray2d< EffectContent,
PTYPEO_SIZE, Offset32::SIZE
effectTableNotLongU
CArray2d< unsigned int,
2, SHORT_DIRECTION_SIZE
shortMoveMask

Detailed Description

Definition at line 18 of file ptypeTable.h.


Constructor & Destructor Documentation


Member Function Documentation

bool osl::PtypeTable::canDropTo ( Ptype  ptype,
Square  pos,
Int2Type< BLACK  
) const [inline, private]
bool osl::PtypeTable::canDropTo ( Ptype  ptype,
Square  pos,
Int2Type< WHITE  
) const [inline, private]

Definition at line 86 of file ptypeTable.h.

References getCanDropLimit(), osl::WHITE, and osl::Square::y().

bool osl::PtypeTable::canDropTo ( Player  pl,
Ptype  ptype,
Square  pos 
) const [inline]

Definition at line 91 of file ptypeTable.h.

References osl::BLACK, and canDropTo().

EffectContent& osl::PtypeTable::effect ( PtypeO  ptypeo,
Offset32  offset32 
) [inline, private]
int osl::PtypeTable::getCanDropLimit ( Player  player,
Ptype  ptype 
) const [inline]

Definition at line 75 of file ptypeTable.h.

References canDropLimit, osl::isPromoted(), osl::isValid(), and osl::playerToIndex().

Referenced by canDropTo().

const char* osl::PtypeTable::getCsaName ( Ptype  ptype) const [inline]
const EffectContent osl::PtypeTable::getEffect ( PtypeO  ptypeo,
Square  from,
Square  to 
) const [inline]

fromにいるptypeoがtoに利きを持つか?

Parameters:
ptypeo- 駒の種類
from- 駒の位置
to- 利きをチェックするマスの位置

Definition at line 135 of file ptypeTable.h.

References osl::Square::isOnBoard().

Referenced by osl::checkmate::Dfpn::attack(), osl::move_generator::addeffect8::canAddLongEffect(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::checkmate::FixedDepthSearcher2::defenseEstimation(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack2(), osl::effect_util::AdditionalEffect::find(), osl::eval::See::findAdditionalPieces(), osl::move_generator::addeffect8::findBlocker(), osl::effect_util::Pin::findPtype(), osl::checkmate::Dfpn::generateCheck(), osl::move_generator::addeffect8::generateLongDropWithOffset(), osl::move_generator::without_effect::generateLongMove(), osl::move_generator::addeffect8::hasEffect(), osl::state::NumEffectState::hasEffectIf(), osl::effect::hasLongMove(), osl::move_generator::addeffect8::hasShortEffect(), osl::effect::hasShortMove(), osl::move_generator::addeffect8::hasUnblockableEffect(), hasUnblockableEffect(), osl::checkmate::ImmediateCheckmateTable::ImmediateCheckmateTable(), osl::state::SimpleState::isAlmostValidMove(), osl::move_probability::BreakThreatmate::isDefendingThreatmate(), osl::effect_util::UnblockableCheck::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::state::SimpleState::isValidMoveByRule(), osl::effect::Liberty8Table::Liberty8Table(), PtypeTable(), osl::effect::setBetweenMask(), osl::effect_util::SendOffSquare::Table::Table(), osl::search::StateElements::validCaptureMove(), and osl::search::StateElements::validSimpleMove().

const EffectContent& osl::PtypeTable::getEffect ( PtypeO  ptypeo,
Offset32  offset32 
) const [inline]
const EffectContent osl::PtypeTable::getEffectNotLongU ( PtypeO  ptypeo,
Square  from,
Square  to 
) const [inline]

ptypeo が,自分から offset のところに効きを持つか? U除く

Definition at line 156 of file ptypeTable.h.

References effectTableNotLongU, osl::Square::isOnBoard(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.

int osl::PtypeTable::getIndexLimit ( Ptype  ptype) const [inline]
int osl::PtypeTable::getIndexMin ( Ptype  ptype) const [inline]
static int osl::PtypeTable::getKingIndex ( Player  p) [inline, static]

Definition at line 121 of file ptypeTable.h.

References osl::BLACK, and osl::isValid().

mask_t osl::PtypeTable::getMaskLow ( Ptype  ptype) const [inline]
int osl::PtypeTable::getMoveMask ( Ptype  ptype) const [inline]
const char* osl::PtypeTable::getName ( Ptype  ptype) const [inline]

Definition at line 99 of file ptypeTable.h.

References names.

Referenced by osl::operator<<().

unsigned int osl::PtypeTable::getShortMoveMask ( Player  p,
PtypeO  ptypeo,
Direction  dir 
) const [inline]

Definition at line 44 of file ptypeTable.h.

References osl::playerToIndex(), osl::PTYPEO_MIN, and shortMoveMask.

bool osl::PtypeTable::hasLongMove ( Ptype  ptype) const [inline]
bool osl::PtypeTable::hasUnblockableEffect ( PtypeO  attacker,
Square  from,
Square  to 
) const [inline]
void osl::PtypeTable::init ( ) [private]
template<osl::Ptype T>
void osl::PtypeTable::initPtype ( ) [private]

Definition at line 48 of file ptypeTable.cc.

References osl::isBasic().

template<osl::Ptype T>
void osl::PtypeTable::initPtypeSub ( Int2Type< false >  isBasic) [private]

Definition at line 39 of file ptypeTable.cc.

template<osl::Ptype T>
void osl::PtypeTable::initPtypeSub ( Int2Type< true >  isBasic) [private]

Definition at line 21 of file ptypeTable.cc.

References osl::canPromote(), osl::promote(), and osl::Square::reverseY().

bool osl::PtypeTable::isBetterToPromote ( Ptype  ptype) const [inline]

Member Data Documentation

Definition at line 25 of file ptypeTable.h.

Referenced by isBetterToPromote().

CArray2d<int, 2, PTYPE_SIZE> osl::PtypeTable::canDropLimit [private]

Definition at line 30 of file ptypeTable.h.

Referenced by getCanDropLimit().

CArray<const char *, PTYPE_SIZE> osl::PtypeTable::csaNames [private]

Definition at line 24 of file ptypeTable.h.

Referenced by getCsaName().

Definition at line 32 of file ptypeTable.h.

Referenced by effect(), and getEffect().

Definition at line 33 of file ptypeTable.h.

Referenced by getEffectNotLongU().

CArray<int, PTYPE_SIZE> osl::PtypeTable::indexLimits [private]

Definition at line 28 of file ptypeTable.h.

Referenced by getIndexLimit().

CArray<int, PTYPE_SIZE> osl::PtypeTable::indexMins [private]

Definition at line 27 of file ptypeTable.h.

Referenced by getIndexMin().

CArray<int, PTYPE_SIZE> osl::PtypeTable::moveMasks [private]

Definition at line 26 of file ptypeTable.h.

Referenced by getMoveMask().

CArray<const char *, PTYPE_SIZE> osl::PtypeTable::names [private]

Definition at line 23 of file ptypeTable.h.

Referenced by getName().

CArray<int, PTYPE_SIZE> osl::PtypeTable::numIndices [private]

Definition at line 22 of file ptypeTable.h.

CArray<mask_t, PTYPE_SIZE> osl::PtypeTable::numMaskLows [private]

Definition at line 21 of file ptypeTable.h.

Referenced by getMaskLow().

CArray2d<unsigned int, 2, SHORT_DIRECTION_SIZE> osl::PtypeTable::shortMoveMask [private]

Definition at line 34 of file ptypeTable.h.

Referenced by getShortMoveMask().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines