diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-09-06 20:11:36 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-09-06 20:11:36 +0200 |
commit | 411d2f6d6a6e5370d33f0f54b2f2de7147a9d977 (patch) | |
tree | 82b631079a3d7226ce6384f695f2e3b213a2c635 /game/ai/tactic.h | |
parent | 522a43d16e812e10ff69747ee916918b4bd29f2f (diff) |
started ai
Diffstat (limited to 'game/ai/tactic.h')
-rw-r--r-- | game/ai/tactic.h | 32 |
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 |