private static void newTopscore() throws FileNotFoundException {
		String initials = "";
		while(initials.equals("")) // Re-show the window until the user types something 
			initials = dialogInput();
		int rank = 0;	
		for (int i=0; i<topscore_length;i++) {
			if (topScores[i] > moves) {
				rank = i;
				break;
			}
		}
		
		for (int j=topscore_length-1; j>rank; j--){
			topScores[j]=topScores[j-1];
			topNames[j]=topNames[j-1];
		}
		if (moves <= 999)
			topScores[rank] = moves;
		else
			topScores[rank] = 999;
		topNames[rank] = initials;
		
		writeFile();
	}