-
Notifications
You must be signed in to change notification settings - Fork 0
/
StatGenerator.java
57 lines (39 loc) · 1.59 KB
/
StatGenerator.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package statCalculator;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.Scanner;
import javax.swing.*;
public class StatGenerator {
public static void main(String[] args) throws FileNotFoundException {
StatReader read = new StatReader();
Scanner scan = new Scanner(System.in);
System.out.println("Select calculating mode: 1 Standard 2 Advanced");
int mode = scan.nextInt();
// System.out.println("Copy the file path you would like to read.");
//
// String filepath = scan.next();
//System.out.println("What would you like to name the file?");
//String fileName = scan.next();
// System.out.println("Where would you like to output?");
//
// String folder = scan.next();
System.out.println("Choose a name for your division of teams");
String divisionName = scan.next();
Division division = new Division(divisionName);
String filepath = "C:\\Users\\Ethan\\eclipse-workspace\\Call of Duty Stat Calculator\\src\\Basic Stats.txt";
String savePath = "C:\\Users\\Ethan\\Desktop\\Stats\\Test1.csv";
if(mode == 1) {
generateGeneral(filepath,savePath,read,division);
}
}
public static void generateGeneral(String statSheet, String output, StatReader read, Division division) throws FileNotFoundException {
OutputStream outputStream = new PrintStream(output);
read = new StatReader(statSheet, division);
FileFormatter format = new FileFormatter(division);
format.generateGeneral(outputStream);
}
}