-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (23 loc) · 717 Bytes
/
main.cpp
File metadata and controls
34 lines (23 loc) · 717 Bytes
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
#include "Event.h"
#include "Parser.h"
#include <iostream>
#include <fstream>
int main(int argc, char const *argv[]) {
if (argc == 4 || argc == 5) {
std::ifstream teams(argv[1]);
std::ifstream matches(argv[2]);
unsigned int depth = atoi(argv[3]);
Event event = Parser::parse(depth, teams, matches);
std::cerr << "Successfully parsed event." << std::endl;
if (argc == 4) {
event.calculate();
} else if (argc == 5) {
unsigned int numSims = atoi(argv[4]);
std::cerr << "Monte Carlo: " << numSims << " num Sims" << std::endl;
event.calculate(numSims);
}
} else {
std::cout << "Usage: augur <teams.csv> <matches.csv> <depth> [numMonteCarloSims]" << std::endl;
}
return 0;
}