|
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 のところに効きを持つか? | |
| 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().
|
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(), init(), 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.
|
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 getEffect(), hasUnblockableEffect(), init(), 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.
|
inline |
Definition at line 93 of file ptypeTable.h.
References indexLimits, and osl::isBasic().
|
inline |
Definition at line 88 of file ptypeTable.h.
References indexMins, and osl::isBasic().
Referenced by hasLongMove().
|
inlinestatic |
Definition at line 98 of file ptypeTable.h.
References osl::BLACK, osl::KingTraits< T >::index, and osl::isValid().
Definition at line 46 of file ptypeTable.h.
References numMaskLows.
|
inline |
Definition at line 84 of file ptypeTable.h.
References moveMasks.
|
inline |
Definition at line 76 of file ptypeTable.h.
References names.
|
inline |
Definition at line 41 of file ptypeTable.h.
References osl::playerToIndex(), osl::PTYPEO_MIN, and shortMoveMask.
|
inline |
Definition at line 140 of file ptypeTable.h.
References effect(), and getEffect().
|
private |
Definition at line 53 of file ptypeTable.cc.
References osl::BLACK, osl::Board_Table, osl::EffectContent::DIRECT(), osl::DIRECTION_MAX, osl::DIRECTION_MIN, effect(), effectTable, effectTableNotLongU, getEffect(), osl::Offset32Base< Width, Width2 >::index(), initPtype(), osl::isLong(), osl::LONG_U, moveMasks, osl::newOffset(), osl::newPtypeO(), numIndices, numMaskLows, osl::PTYPE_MAX, osl::PTYPE_MIN, osl::PTYPEO_MIN, osl::ROOK, shortMoveMask, and osl::WHITE.
Referenced by PtypeTable().
|
private |
|
private |
Definition at line 39 of file ptypeTable.cc.
References betterToPromote, csaNames, moveMasks, and names.
Referenced by initPtype(), and initPtypeSub().
|
private |
黒
白
Definition at line 21 of file ptypeTable.cc.
References canDropLimit, osl::canPromote(), indexLimits, osl::PtypeFuns< T >::indexMask, indexMins, initPtypeSub(), osl::misc::GeneralMask< mask_int_t >::makeDirect(), numIndices, numMaskLows, osl::promote(), and osl::Square::reverseY().
|
inline |
Definition at line 58 of file ptypeTable.h.
References betterToPromote.
|
private |
Definition at line 22 of file ptypeTable.h.
Referenced by initPtypeSub(), and isBetterToPromote().
|
private |
Definition at line 27 of file ptypeTable.h.
Referenced by getCanDropLimit(), and initPtypeSub().
|
private |
Definition at line 21 of file ptypeTable.h.
Referenced by getCsaName(), and initPtypeSub().
|
private |
Definition at line 29 of file ptypeTable.h.
Referenced by effect(), getEffect(), and init().
|
private |
Definition at line 30 of file ptypeTable.h.
Referenced by getEffectNotLongU(), and init().
|
private |
Definition at line 25 of file ptypeTable.h.
Referenced by getIndexLimit(), and initPtypeSub().
|
private |
Definition at line 24 of file ptypeTable.h.
Referenced by getIndexMin(), and initPtypeSub().
|
private |
Definition at line 23 of file ptypeTable.h.
Referenced by getMoveMask(), init(), and initPtypeSub().
|
private |
Definition at line 20 of file ptypeTable.h.
Referenced by getName(), and initPtypeSub().
|
private |
Definition at line 19 of file ptypeTable.h.
Referenced by init(), and initPtypeSub().
|
private |
Definition at line 18 of file ptypeTable.h.
Referenced by getMaskLow(), init(), and initPtypeSub().
|
private |
Definition at line 31 of file ptypeTable.h.
Referenced by getShortMoveMask(), and init().