3#ifndef OSL_DIRECTIONTRAITS_H
4#define OSL_DIRECTIONTRAITS_H
10 template<Direction Dir>
15 static const int blackDx=1;
16 static const int blackDy=-1;
17 static const bool canPromoteTo=
true;
21 static const int ptypeMask=
28 static const int blackDx=0;
29 static const int blackDy=-1;
30 static const bool canPromoteTo=
true;
34 static const int ptypeMask=
41 static const int blackDx=-1;
42 static const int blackDy=-1;
43 static const bool canPromoteTo=
true;
47 static const int ptypeMask=
53 static const int blackDx=1;
54 static const int blackDy=0;
55 static const bool canPromoteTo=
false;
59 static const int ptypeMask=
65 static const int blackDx=-1;
66 static const int blackDy=0;
67 static const bool canPromoteTo=
false;
71 static const int ptypeMask=
77 static const int blackDx=1;
78 static const int blackDy=1;
79 static const bool canPromoteTo=
false;
83 static const int ptypeMask=
88 static const int blackDx=0;
89 static const int blackDy=1;
90 static const bool canPromoteTo=
false;
94 static const int ptypeMask=
100 static const int blackDx=-1;
101 static const int blackDy=1;
102 static const bool canPromoteTo=
false;
106 static const int ptypeMask=
111 static const int blackDx=1;
112 static const int blackDy=-2;
113 static const bool canPromoteTo=
true;
118 static const int ptypeMask=
123 static const int blackDx=-1;
124 static const int blackDy=-2;
125 static const bool canPromoteTo=
true;
130 static const int ptypeMask=
136 static const bool canPromoteTo=
true;
142 static const int ptypeMask=
148 static const bool canPromoteTo=
true;
154 static const int ptypeMask=
160 static const bool canPromoteTo=
true;
166 static const int ptypeMask=
171 static const bool canPromoteTo=
false;
177 static const int ptypeMask=
182 static const bool canPromoteTo=
false;
188 static const int ptypeMask=
193 static const bool canPromoteTo=
false;
199 static const int ptypeMask=
204 static const bool canPromoteTo=
false;
210 static const int ptypeMask=
215 static const bool canPromoteTo=
false;
221 static const int ptypeMask=
224 template<Direction Dir>
227 static const unsigned int mask=1<<
static_cast<int>(Dir);
241 template<Direction Dir,Player P>
244 template<Direction Dir>
251 template<Direction Dir>
254 template<Direction Dir>
261 template<Direction Dir>
264 template <Player P, Direction D>
constexpr Direction primDir(Direction d)
8方向について,primitiveな4方向を求める
static const Offset offset()
static const Offset offset()
static const unsigned int mask
static const Direction longDir
static const bool canPromoteTo
static const Direction primDir
static const Offset blackOffset()
static const Direction altDir
static const int ptypeMaskNotKing
static const int ptypeMask