blob: 58b739277d37e8022b3c68ae17fe790150cda976 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "action.h"
#include <algorithm>
Action::Action() {
}
Action::Action(Type ty, int ta) : type(ty), target(ta) {
}
bool Action::operator==(const Action& other) {
return type == other.type && target == other.target;
}
Actions::operator bool() {
return !empty();
}
bool Actions::contains(Action action) {
return std::find(begin(), end(), action) != end();
}
|