private void start(int row, int column) {
final int[][] map = new int[row][column];
int y = 0, x = 0, fillNum = 0, direction = 0;
do {
if (map[y][x] == 0) {
map[y][x] = ++fillNum;
continue;
}
while (true) {
int newY = y + ((direction == 3) ? -1 : (direction & 1));
int newX = x + ((direction == 2) ? -1 : (direction & 1) ^ 1);
if (newX < column && newX >= 0 && newY >= 0 && newY < row && map[newY][newX] == 0) {
y = newY;
x = newX;
break;
}
direction = (direction + 1) & 3;
}
} while (fillNum < column * row);
for (int i = 0; i < row; i++) {
for (int j = 0; j < column; j++) {
System.out.printf("%02d ", map[i][j]);
}
System.out.println();
}
}