3 #ifndef OSL_BOARD_TABLE_H
4 #define OSL_BOARD_TABLE_H
17 CArray<unsigned char,Offset::ONBOARD_OFFSET_SIZE>
short8Dir;
24 static const CArray<Offset, DIRECTION_SIZE>
offsets;
25 static const CArray<int, DIRECTION_SIZE>
dxs;
26 static const CArray<int, DIRECTION_SIZE>
dys;
28 template<Direction Dir>
30 template<Direction Dir>
38 return offsets[
static_cast<int>(dir)];
41 return dxs[
static_cast<int>(dir)];
44 return dys[
static_cast<int>(dir)];
52 return getOffset<BLACK>(dir);
54 return getOffset<WHITE>(dir);
82 return getLongDirection<BLACK>(offset32);
84 return getLongDirection<WHITE>(offset32);
90 return getLongDirection<P>(
Offset32(to,from));
142 return getShort8Unsafe<BLACK>(from, to);
144 return getShort8Unsafe<WHITE>(from, to);
149 assert(from.
x()==to.
x() || from.
y()==to.
y() ||
150 abs(from.
x()-to.
x())==abs(from.
y()-to.
y()));
151 return getShort8Unsafe<P>(from,to);
157 assert(from.
x()==to.
x() || from.
y()==to.
y() ||
158 abs(from.
x()-to.
x())==abs(from.
y()-to.
y()));