46 m_nSrc0(src0), m_nDest0(dest0), m_nSrc1(src1), m_nDest1(dest1), m_nWidth(w){
57 const int x = i%
m_nWidth + delta.first;
58 const int y = i/
m_nWidth + delta.second;
Defines, enumerated types, and typedefs.
int m_nDest0
Index of cell at the other end of first edge.
std::pair< int, int > MoveDelta
Move delta for a knight's move.
int m_nWidth
Width of chessboard.
Header for helper functions.
void GetEdge0(int &src, int &dest)
Get first edge.
unsigned int UINT
Abbreviation for unsigned integer.
bool IsKnightMove(int i, int j)
Knight's move test.
void GetEdge1(int &src, int &dest)
Get second edge.
int m_nSrc1
Index of cell at one end of second edge.
int m_nSrc0
Index of cell at one end of first edge.
MoveDeltas g_vecDeltas
Move deltas for all possible knight's moves.
int m_nDest1
Index of cell at the other end of second edge.
std::vector< MoveDelta > MoveDeltas
Move deltas for knight's moves.
CRail(int src0, int dest0, int src1, int dest1, UINT w)
Constructor.