summaryrefslogtreecommitdiff
path: root/common/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/action.cpp')
-rw-r--r--common/action.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/action.cpp b/common/action.cpp
index 188535e..58b7392 100644
--- a/common/action.cpp
+++ b/common/action.cpp
@@ -1,10 +1,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();
}