public static void Build(int n, String filename) throws FileNotFoundException{
		// generate Board
		int [][] Board = new int[n][n];
		boolean[] numberUsed = new boolean[n*n]; // each index needs to appear on board. the value at that array position is true if on board, false if not 
		for (int i=0; i<n*n; i++){
			numberUsed[i] = false; 
		}
		for(int r=0; r<n; r++){
			 for(int c=0; c<n; c++){
				 int randomNumber = -1;
				 while(randomNumber==-1){
					 randomNumber = (int)Math.floor(Math.random()*n*n);
					 if(numberUsed[randomNumber]){
						 randomNumber = -1; 
					 }
				 }
				 numberUsed[randomNumber] = true; 
				 Board[r][c] = randomNumber; 
			}
		}
		// write to text file
		PrintWriter writer = new PrintWriter(filename);	
		writer.print(n);
		for(int r=0; r<n; r++){
			for(int c=0; c<n; c++){
				if(c==0){
					writer.println(""); 
				}
				writer.print(Board[r][c] + " ");
			}
		}
		writer.close(); 
	}