import java.util.Scanner;
import java.io.File;

/**
 *
 * @author davereed
 */
public class LeagueDriver {
    public static void main(String[] args) {
        System.out.println("Enter a file name: ");
        Scanner input = new Scanner(System.in);
        
        ScoresList scores = new ScoresList();
        
        String filename = input.next();
        try {
           Scanner infile = new Scanner(new File(filename));
           while (infile.hasNextLine()) {
               String team1 = infile.next();
               int score1 = infile.nextInt();
               String team2 = infile.next();
               int score2 = infile.nextInt();
                              
               scores.recordScore(team1, score1, team2, score2);
           }
           
           scores.displayScores();
        }
        catch (java.io.FileNotFoundException e) {
            System.out.println("File not found");
        }
    }
}
