protected boolean solve(int y, int x, int[][] sudoku) {
		/*
		 * If the algorithm finished recursing through the x-th column, increase
		 * the column index and reset y.
		 */
		if (y == this.sudokuSize) {
			y = 0;
			if (++x == this.sudokuSize) {
				/*
				 * If all columns have been finished (the recursion filled every
				 * field in the Sudoku), a solution has been found
				 */
				return true;
			}
		}

		/*
		 * If the field is already filled, skip it.
		 */
		if (sudoku[y][x] != 0) {
			return solve(y + 1, x, sudoku);
		}

		/*
		 * Try to set every possible value (if it is legal) in the cell and
		 * solve the resulting Sudokus.
		 */
		for (int val = 1; val <= this.sudokuSize; ++val) {
			if (legal(y, x, val, sudoku)) {
				sudoku[y][x] = val;
				if (solve(y + 1, x, sudoku)) {
					/*
					 * If solve(y+1, x, sudoku) was successful, a solution was
					 * found.
					 */
					return true;
				}
			}
		}
		/*
		 * No value was possible, reset on backtrack and return false.
		 */
		sudoku[y][x] = 0;
		return false;
	}