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