15 template <
int W
idth,
int W
idth2>
19 MIN = -(Width*32+Width),
20 MAX = (Width*32+Width),
31 : offset32(to.indexForOffset32()-from.indexForOffset32())
33 assert((to.
x()-from.
x() >= -Width) && (to.
x()-from.
x() <= Width)
34 && (to.
y()-from.
y() >= -Width) && (to.
y()-from.
y() <= Width));
35 assert(
MIN<=offset32 && offset32<=
MAX);
38 assert(-Width2<=dx && dx<=Width2 && -Width2<=dy && dy<=Width2);
42 return offset32 -
MIN;
46 return MIN <=offset32 && offset32 <=
MAX;
static const unsigned int SIZE
const Offset32Base operator-() const
const Offset32Base blackOffset32() const
Player P からみた offset を黒番のものに変更する
Offset32Base< 10, 10 > Offset32Wide
int dy(Offset32Base offset32)
int y() const
将棋としてのY座標を返す.
int x() const
将棋としてのX座標を返す.
Offset32Base< 8, 9 > Offset32
unsigned int index() const
int dx(Offset32Base offset32)
Offset32Base(Square to, Square from)
Offset32Base(int dx, int dy)