-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (29 loc) · 816 Bytes
/
Copy pathmain.cpp
File metadata and controls
37 lines (29 loc) · 816 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
35
36
37
#include "Modes.h"
#include <iostream>
using std::cout, std::endl;
int main(int argc, char** argv) {
// check if first argument is train, test or play
if (argc < 2) {
std::cout << "Please specify train, test or play" << std::endl;
return 0;
}
std::string mode = argv[1];
if (mode == "train") {
if (argc < 3) {
std::cout << "Please specify run path" << std::endl;
return 0;
}
train(argv[2]);
} else if (mode == "test") {
if (argc < 3) {
std::cout << "Please specify load path" << std::endl;
return 0;
}
test(argv[2]);
} else if (mode == "play") {
play();
} else {
std::cout << "Please specify train, test or play" << std::endl;
}
return 0;
}