summaryrefslogtreecommitdiff
path: root/2015-spacebot/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to '2015-spacebot/main/main.cpp')
-rw-r--r--2015-spacebot/main/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/2015-spacebot/main/main.cpp b/2015-spacebot/main/main.cpp
new file mode 100644
index 0000000..5c7f183
--- /dev/null
+++ b/2015-spacebot/main/main.cpp
@@ -0,0 +1,25 @@
+#include <iostream>
+#include <string>
+
+#include "spacebot.h"
+
+int main(int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ std::cout << "usage: " << argv[0] << " <output folder>" << std::endl;
+ return 1;
+ }
+
+ std::string brainFilename = "brain.nn";
+
+ if (argc >= 3)
+ {
+ brainFilename = argv[2];
+ }
+
+ Spacebot bot(argv[1], std::move(brainFilename));
+ bot.writeNextMove();
+
+ return 0;
+}