src/Reader.java
/**
     * parses the HighScore file into Linked Lists of names and scores
     */
parses the HighScore file into Linked Lists of names and scores
parses the HighScore file into Linked Lists of names and scores
public void highScore() {
        String s = null;
        this.names = new LinkedList<String>();
        this.scores = new LinkedList<Integer>();
        if (check) {
            try {
                do {
                    s = sr.readLine();
                    if (s == null || s.isEmpty()) {
                        break;
                    }
                    String[] high = s.split(";");
                    if (high.length != 2 || high == null) {
                        break;
                    }
                    this.names.add(high[0]);
                    this.scores.add(Integer.parseInt(high[1]));
                } while (s != null);           
            } catch (IOException e) {
            }
        }
    }
public void highScore ( ) { String s = null ; this . names = new LinkedList < String > ( ) ; this . scores = new LinkedList < Integer > ( ) ; if ( check ) { try { do { s = sr . readLine ( ) ; if ( s == null || s . isEmpty ( ) ) { break ; } String [ ] high = s . split ( ";" ) ; if ( high . length != 2 || high == null ) { break ; } this . names . add ( high [ 0 ] ) ; this . scores . add ( Integer . parseInt ( high [ 1 ] ) ) ; } while ( s != null ) ; } catch ( IOException e ) { } } }
parses the HighScore file into Linked Lists of names and scores
parses the HighScore file into Linked Lists of names and scores
// Checking if line is blank in case of buggy writing
