summaryrefslogtreecommitdiff
path: root/common/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/action.cpp')
-rw-r--r--common/action.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/action.cpp b/common/action.cpp
new file mode 100644
index 0000000..467df4e
--- /dev/null
+++ b/common/action.cpp
@@ -0,0 +1,10 @@
+#include "action.h"
+#include <algorithm>
+
+bool Action::operator==(Action other) {
+ return type == other.type && target == other.target;
+}
+
+bool Actions::contains(Action action) {
+ return std::find(begin(), end(), action) != end();
+}