aboutsummaryrefslogtreecommitdiff
path: root/game/ai/tactic.h
blob: ec2e382b312d5e5cd8375036b896464a9bda98d7 (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