public void generateSudoku() {
		
		int number = -1;
		boolean horCopy   = false; //The random number is the same as another horizontally
		boolean verCopy   = false; //The random number is the same as another vertically
		boolean boxCopy   = false; //The random number is the same as another in its box
		boolean denyValue = false; //The random number is the same as another already attempted
		
		//Initialise solutions
		for(int i=0;i<3;i++) {
			for(int n=0;n<3;n++) {
				for(int t=0;t<3;t++) {
					for(int e=0;e<3;e++) {
						solution[i][n][t][e] = -1;
					}
				}
			}
		}
		
		//Calculate solutions
		for(int i=0;i<3;i++) {
			for(int n=0;n<3;n++) {
				for(int t=0;t<3;t++) {
					for(int e=0;e<3;e++) {
						
						String valuesCopied = "";
						
						do {
							
							denyValue = false;
							
							number = random.nextInt(9) + 1;
							if(valuesCopied.contains(String.valueOf(number))) {
								if(valuesCopied.length() >= 9) {
									
									for(int g=0;g<3;g++) {
										for(int r=0;r<3;r++) {
											for(int s=0;s<3;s++) {
												solution[i][g][r][s] = -1;
											}
										}
									}
									
									n = 0;
									t = 0;
									e = 0;
									
								} else {denyValue = true;}
							}
							
							if(!denyValue) {
								
								horCopy = false;
								verCopy = false;
								boxCopy = false;
								
								for(int a=0;a<3;a++) {
									if(horCopy || verCopy || boxCopy) {break;}
									for(int b=0;b<3;b++) {
										if(horCopy || verCopy || boxCopy) {break;}
										
										if(number == solution[i][a][t][b]) {
											horCopy = true;
											valuesCopied += String.valueOf(number);
										}
										if(number == solution[a][n][b][e]) {
											verCopy = true;
											valuesCopied += String.valueOf(number);
										}
										if(number == solution[i][n][a][b]) {
											boxCopy = true;
											valuesCopied += String.valueOf(number);
										}
									}								
								}
								
							}
							
						} while(horCopy || verCopy || boxCopy || denyValue);
						
						solution[i][n][t][e] = number;
						
					}
				}
			}
		}
		
	}