private void generate(int nFill) {
		/*
		 * Options:
		 * nFill= How many slots are to be filled in.
		 */
		int[][] slotsTemplate = new int[9][9];
		Generator generator = new Generator(nFill);
		Sudoku candidate = new Sudoku();
		
		// Statistics
		long timer_start = System.currentTimeMillis();
		int nSudokusGenerated = 0; // How many sudoku's have we generated
		int lastSecondDisplayed = -1;
		do {
			clear();
			candidate = generator.generate();
			nSudokusGenerated++;
			
			slotsTemplate = Util.ArrayCopy99(candidate.slots);
			SolverV5 solver = new SolverV5(candidate);
			solver.solve();
			
			// Print statistics
			long timer_elapsed = System.currentTimeMillis() - timer_start;
			int nSeconds = (int) Math.floor(timer_elapsed / 1000);
			//Util.dprint("Time: " + nSeconds + "s.");
			if (nSeconds % 1 == 0 && lastSecondDisplayed != nSeconds && nSeconds != 0) {
				lastSecondDisplayed = nSeconds;
				int nMinutes = (int) Math.floor(nSeconds / 60);
				String time = "Time spent: ";
				if (nMinutes > 0)
					time += nMinutes + "m ";
				time += nSeconds % 60 + "s.";
				Util.dprint("Generated " + nSudokusGenerated + " sudokus so far. " + time);
			}
		} while (!candidate.validateField());
		if (candidate.validateField()) {
			slots = slotsTemplate;
		} else {
			Util.dprint("Failed to generate.");
			clear();
		}
	}