3#ifndef OSL_PTYPETRAITS_H
4#define OSL_PTYPETRAITS_H
21 static const char *
name() {
return "PTYPE_EMPTY";}
22 static const char *
csaName() {
return "..";}
32 static const char *
name() {
return "PTYPE_EDGE";}
33 static const char *
csaName() {
return "XX";}
44 static const char *
name() {
return "GOLD";}
45 static const char *
csaName() {
return "KI";}
65 static const char *
name() {
return "PAWN";}
66 static const char *
csaName() {
return "FU";}
83 static const char *
name() {
return "PPAWN";}
84 static const char *
csaName() {
return "TO";}
98 static const char *
name() {
return "LANCE";}
99 static const char *
csaName() {
return "KY";}
115 static const char *
name() {
return "PLANCE";}
130 static const char *
name() {
return "KNIGHT";}
147 static const char *
name() {
return "PKNIGHT";}
162 static const char *
name() {
return "SILVER";}
182 static const char *
name() {
return "PSILVER";}
197 static const char *
name() {
return "BISHOP";}
217 static const char *
name() {
return "PBISHOP";}
236 static const char *
name() {
return "ROOK";}
256 static const char *
name() {
return "PROOK";}
276 static const char *
name() {
return "KING";}
289 template<Ptype T,
bool IsBasic>
303 static const uint64_t
indexMask=
static_cast<uint64_t
>(0);
312#if OSL_WORDSIZE == 64
313 static const unsigned int indexNum=0;
314#elif OSL_WORDSIZE == 32
338 template<Ptype T,Direction D>
361 template<Ptype T,Player P>
414 else return pos.
yLe<3>();
419 else return pos.
yGe<7>();
std::enable_if< Y!=7, bool >::type yGe()
int y() const
将棋としてのY座標を返す.
static int reverseY(int y)
std::enable_if< Y!=2, bool >::type yLe()
constexpr int playerToIndex(Player player)
MoveConstraint
ある方向にある駒が移動可能かを表す.
@ NoConstraint
promoteしていようが,いまいが可能
@ OnlyBasic
promoteしていない駒の場合にのみ可能
@ OnlyPromoted
promote済みの駒の場合にのみ可能
static const unsigned int mask
static const Direction longDir
static const bool hasMove
static const bool canMove
static const MoveConstraint moveConstraint
static const Ptype promotePtype
static const uint64_t indexMask
static const Ptype basicType
static const Ptype basicType
static const uint64_t indexMask
static const Ptype promotePtype
static const Ptype promotePtype
static const Ptype basicType
static const uint64_t indexMask
static const bool hasLongMove
static bool canDropTo(Square pos)
static bool checkPromote(Square pos)
posにあるTの駒がpromote可能なdirectionに動く時だけpromote可能 shortの時はその時のみYES
static bool canPromote(Square pos)
posにあるTの駒がどの方向に動いてもpromote可能
static bool mayPromote(Square pos)
posにある駒がpromoteする可能性があるか?
static bool noPromote(Square pos)
posにあるTの駒は次に絶対にpromoteできない
static bool mustPromote(Square pos)
posにあるTの駒がpromoteする手しかない
static const bool canPromote
static const int indexMin
static const int indexLimit
static const char * name()
static const bool isBasic
static const bool betterToPromote
static const Ptype basicType
static const int dropBlackFromY
static const int dropBlackToY
static const int moveMask
static const char * csaName()
static const Ptype moveType
static const int mayPromoteToY
static const int dropBlackFromY
static const Ptype basicType
static const bool betterToPromote
static const int moveMask
static const Ptype moveType
static const bool canPromote
static const int dropBlackToY
static const char * csaName()
static const int indexMin
static const int indexLimit
static const bool isBasic
static const char * name()
static const Ptype moveType
static const char * name()
static const Ptype basicType
static const int indexLimit
static const int dropBlackFromY
static const int dropBlackToY
static const int indexMin
static const bool isBasic
static const char * csaName()
static const int moveMask
static const bool canPromote
static const bool betterToPromote
static const bool isBasic
static const char * csaName()
static const int dropBlackFromY
static const bool betterToPromote
static const bool canPromote
static const int indexLimit
static const char * name()
static const int moveMask
static const Ptype basicType
static const int indexMin
static const int mayPromoteToY
static const Ptype moveType
static const int dropBlackToY
static const Ptype basicType
static const int mayPromoteToY
static const int indexMin
static const Ptype moveType
static const bool isBasic
static const char * csaName()
static const int indexLimit
static const int dropBlackFromY
static const char * name()
static const bool canPromote
static const bool betterToPromote
static const int moveMask
static const int dropBlackToY
static const int indexMin
static const int dropBlackToY
static const int moveMask
static const int dropBlackFromY
static const Ptype basicType
static const int mayPromoteToY
static const bool isBasic
static const int indexLimit
static const Ptype moveType
static const char * csaName()
static const bool betterToPromote
static const bool canPromote
static const char * name()
static const char * csaName()
static const Ptype basicType
static const int indexMin
static const bool canPromote
static const bool isBasic
static const char * name()
static const bool betterToPromote
static const Ptype moveType
static const int moveMask
static const Ptype basicType
static const char * csaName()
static const int moveMask
static const bool canPromote
static const bool isBasic
static const char * name()
static const int indexMin
static const Ptype moveType
static const bool betterToPromote
static const bool isBasic
static const int moveMask
static const char * name()
static const char * csaName()
static const int indexMin
static const Ptype basicType
static const bool canPromote
static const Ptype moveType
static const bool betterToPromote
static const bool canPromote
static const bool betterToPromote
static const char * csaName()
static const Ptype basicType
static const char * name()
static const Ptype moveType
static const bool isBasic
static const int indexMin
static const int moveMask
static const int moveMask
static const char * name()
static const bool isBasic
static const bool betterToPromote
static const bool canPromote
static const char * csaName()
static const int indexMin
static const Ptype basicType
static const Ptype moveType
static const char * csaName()
static const Ptype moveType
static const bool betterToPromote
static const int moveMask
static const char * name()
static const int indexMin
static const Ptype basicType
static const bool canPromote
static const bool isBasic
static const bool canPromote
static const bool isBasic
static const int moveMask
static const char * csaName()
static const bool betterToPromote
static const char * name()
static const bool canPromote
static const char * name()
static const bool betterToPromote
打ち歩詰を除いて考えると promoteは常に得
static const char * csaName()
static const int moveMask
static const bool isBasic
static const Ptype basicType
static const Ptype moveType
static const int indexMin
static const bool betterToPromote
static const int indexLimit
static const int dropBlackToY
static const int moveMask
static const char * name()
static const int mayPromoteToY
static const char * csaName()
static const bool canPromote
static const int dropBlackFromY
static const bool isBasic
static const bool betterToPromote
static const bool canPromote
static const int mayPromoteToY
static const bool isBasic
static const Ptype moveType
static const char * csaName()
static const Ptype basicType
static const int indexLimit
static const int indexMin
static const int dropBlackToY
static const int moveMask
static const char * name()
static const int dropBlackFromY