-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (29 loc) · 832 Bytes
/
Copy pathmain.cpp
File metadata and controls
34 lines (29 loc) · 832 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 "main_evaluate.hpp"
#include "main_visualize.hpp"
#include <iostream>
void printUsage() {
std::cout << "Usage:" << std::endl;
std::cout << "\t./BraitenBoids.exe evaluate -g <num_generations> -r "
"<num_runs> -d <description>"
<< std::endl;
std::cout << "\t./BraitenBoids.exe visualize -i path/to/boids.json"
<< std::endl;
}
int main(int argc, char *argv[]) {
if (argc < 2) {
std::cout << "Missing required argument." << std::endl;
printUsage();
return 1;
}
if (!strcmp(argv[1], "evaluate")) {
MainEvaluate m(argc, argv);
return 0;
}
if (!strcmp(argv[1], "visualize")) {
MainVisualize m(argc, argv);
return 0;
}
std::cout << "Unknown command: " << argv[1] << std::endl;
printUsage();
return 1;
}