blob: 7eefef9a5f65c82c6e8e7c6293fcc319cacd9077 (
plain)
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
|
#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
|