public void importAlliancesScoring(HashMap<MatchGeneral, MatchDetailRelicJSON> scores){
        File allianceFile = new File(Config.SCORING_DIR + File.separator + "alliances.txt");
        if (allianceFile.exists()) {
            try {
                BufferedReader reader = new BufferedReader(new FileReader(allianceFile));
                String line;
                alliances = new Alliance[4];
                while ((line = reader.readLine()) != null) {
                    /* Alliance info */
                    String[] allianceInfo = line.split("\\|");
                    int division = Integer.parseInt(allianceInfo[0]);
                    int allianceNumber = Integer.parseInt(allianceInfo[1]);
                    int[] allianceNumbers = {Integer.parseInt(allianceInfo[3]), Integer.parseInt(allianceInfo[4]), Integer.parseInt(allianceInfo[5])};
                    alliances[allianceNumber-1] = new Alliance(division, allianceNumber, allianceNumbers);
                }
                reader.close();
                /* TODO - Make Upload Alliances so we can uncomment this
                controller.btnUploadAlliances.setDisable(false);*/
                updateAllianceLabels(scores);
                TOALogger.log(Level.INFO, "Alliance import successful.");
            } catch (Exception e) {
                e.printStackTrace();
                controller.sendError("Could not open file. " + e.getLocalizedMessage());
            }
        } else {
            controller.sendError("Could not locate alliances.txt from the Scoring System. Did you generate an elimination bracket?");
        }
    }
public void importAlliancesScoring(HashMap<MatchGeneral, MatchDetailRelicJSON> scores){
        File allianceFile = new File(Config.SCORING_DIR + File.separator + "alliances.txt");
        if (allianceFile.exists()) {
            try {
                BufferedReader reader = new BufferedReader(new FileReader(allianceFile));
                String line;
                alliances = new Alliance[4];
                while ((line = reader.readLine()) != null) {
                   
                    String[] allianceInfo = line.split("\\|");
                    int division = Integer.parseInt(allianceInfo[0]);
                    int allianceNumber = Integer.parseInt(allianceInfo[1]);
                    int[] allianceNumbers = {Integer.parseInt(allianceInfo[3]), Integer.parseInt(allianceInfo[4]), Integer.parseInt(allianceInfo[5])};
                    alliances[allianceNumber-1] = new Alliance(division, allianceNumber, allianceNumbers);
                }
                reader.close();
               
                updateAllianceLabels(scores);
                TOALogger.log(Level.INFO, "Alliance import successful.");
            } catch (Exception e) {
                e.printStackTrace();
                controller.sendError("Could not open file. " + e.getLocalizedMessage());
            }
        } else {
            controller.sendError("Could not locate alliances.txt from the Scoring System. Did you generate an elimination bracket?");
        }
    }
public void importalliancesscoring(hashmap<matchgeneral, matchdetailrelicjson> scores){ file alliancefile = new file(config.scoring_dir + file.separator + "alliances.txt"); if (alliancefile.exists()) { try { bufferedreader reader = new bufferedreader(new filereader(alliancefile)); string line; alliances = new alliance[4]; while ((line = reader.readline()) != null) { string[] allianceinfo = line.split("\\|"); int division = integer.parseint(allianceinfo[0]); int alliancenumber = integer.parseint(allianceinfo[1]); int[] alliancenumbers = {integer.parseint(allianceinfo[3]), integer.parseint(allianceinfo[4]), integer.parseint(allianceinfo[5])}; alliances[alliancenumber-1] = new alliance(division, alliancenumber, alliancenumbers); } reader.close(); updatealliancelabels(scores); toalogger.log(level.info, "alliance import successful."); } catch (exception e) { e.printstacktrace(); controller.senderror("could not open file. " + e.getlocalizedmessage()); } } else { controller.senderror("could not locate alliances.txt from the scoring system. did you generate an elimination bracket?"); } }