Go to the documentation of this file.
3 #ifndef OSL_PTYPETABLE_H
4 #define OSL_PTYPETABLE_H
127 const int i2 = offset32.
index();
CArray< int, PTYPE_SIZE > moveMasks
unsigned int getShortMoveMask(Player p, PtypeO ptypeo, Direction dir) const
CArray< const char *, PTYPE_SIZE > names
CArray2d< EffectContent, PTYPEO_SIZE, Offset32::SIZE > effectTableNotLongU
bool isOnBoard() const
盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する.
const EffectContent getEffect(PtypeO ptypeo, Square from, Square to) const
fromにいるptypeoがtoに利きを持つか?
Offset32Base< 8, 9 > Offset32
bool isValidPtypeO(int ptypeO)
CArray2d< int, 2, PTYPE_SIZE > canDropLimit
static int getKingIndex(Player p)
bool hasLongMove(Ptype ptype) const
遅くて良い?
void initPtypeSub(Int2Type< false > isBasic)
bool isBetterToPromote(Ptype ptype) const
mask_t getMaskLow(Ptype ptype) const
const char * getName(Ptype ptype) const
const EffectContent getEffectNotLongU(PtypeO ptypeo, Square from, Square to) const
ptypeo が,自分から offset のところに効きを持つか? U除く
GeneralMask< mask_int_t > mask_t
const PtypeTable Ptype_Table
int getMoveMask(Ptype ptype) const
int getIndexLimit(Ptype ptype) const
CArray2d< EffectContent, PTYPEO_SIZE, Offset32::SIZE > effectTable
EffectContent & effect(PtypeO ptypeo, Offset32 offset32)
int getIndexMin(Ptype ptype) const
int getIndex(Ptype) const
bool isBasic(Ptype ptype)
ptypeが基本型(promoteしていない)かのチェック
int getCanDropLimit(Player player, Ptype ptype) const
bool isValid(Player player)
cast等で作られたplayerが正しいかどうかを返す
const EffectContent & getEffect(PtypeO ptypeo, Offset32 offset32) const
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
CArray< const char *, PTYPE_SIZE > csaNames
CArray2d< unsigned int, 2, SHORT_DIRECTION_SIZE > shortMoveMask
constexpr int playerToIndex(Player player)
bool hasUnblockableEffect() const
短い利きがある.長い利きの隣も含む
bool hasUnblockableEffect(PtypeO attacker, Square from, Square to) const
int y() const
将棋としてのY座標を返す.
bool isPromoted(Ptype ptype)
ptypeがpromote後の型かどうかのチェック
unsigned int index() const
bool canDropTo(Player pl, Ptype ptype, Square pos) const
CArray< bool, PTYPE_SIZE > betterToPromote
CArray< int, PTYPE_SIZE > indexMins
CArray< int, PTYPE_SIZE > indexLimits
const char * getCsaName(Ptype ptype) const
CArray< int, PTYPE_SIZE > numIndices
CArray< mask_t, PTYPE_SIZE > numMaskLows
Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す