-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTeam.java
35 lines (32 loc) · 1002 Bytes
/
Team.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
public class RankingProcess {
public static void main(String[] args) {
/**
* The path for the folder that is storing all Entries text files goes
* in the next line of code
*/
File folder = new File("/Users/valli/Desktop/WorldOfEntries");
File[] list = folder.listFiles();// List of files with Entries
list[0] = new File("");
EntriesToTeamObjects.listOfEntriesInFile = new ArrayList<Entry>();
for (File i : list) {
try {// For the sake of satisfying compiler
EntriesToTeamObjects.getAllEntriesInFileIntoObjectForm(i, EntriesToTeamObjects.readFile(i));
} catch (FileNotFoundException e) {
// Do nothing
}
}
Ranker ranker = new Ranker(EntriesToTeamObjects.teams);
/**
* THE SORTED LIST IS THE ONE THAT IS PRINTED
*/
for (Team team : ranker.sortedListOfTeams) {
System.out.println("Score: " + team.rankScore + " Name:" + team.name);
}
/**
*
*/
}
}