protected ulong GetOneBitNumber(int rank, int file) { // rank and file in 0..7 int squareIndex = rank*8 + file; return 1UL << squareIndex; }