aboutsummaryrefslogtreecommitdiff
path: root/game/ai/tactic.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/ai/tactic.h')
-rw-r--r--game/ai/tactic.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/game/ai/tactic.h b/game/ai/tactic.h
new file mode 100644
index 0000000..7eefef9
--- /dev/null
+++ b/game/ai/tactic.h
@@ -0,0 +1,32 @@
+#ifndef TACTIC_H
+#define TACTIC_H
+
+#include <string>
+#include <vector>
+
+#include "action.h"
+
+namespace ai {
+
+class tactic {
+ public:
+ tactic () { }
+
+ std::vector<action> acts;
+ float eval = 0;
+
+ // copy constructor
+ tactic (const tactic& rhs) { acts = rhs.acts; eval = rhs.eval; }
+ tactic& operator=(const tactic& rhs) { acts = rhs.acts; eval = rhs.eval; }
+
+ std::string to_string () {
+ std::string str = "tactic eval= " + std::to_string(eval) + "\n";
+ for (action act : acts) {
+ str += act.to_string() + "\n";
+ }
+ return str;
+ }
+};
+
+}
+#endif \ No newline at end of file