summaryrefslogtreecommitdiff
path: root/game/orders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/orders.cpp')
-rw-r--r--game/orders.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/game/orders.cpp b/game/orders.cpp
new file mode 100644
index 0000000..18fc889
--- /dev/null
+++ b/game/orders.cpp
@@ -0,0 +1,16 @@
+#include "orders.h"
+#include <algorithm>
+#include <vector>
+
+Objective *
+Orders::current() const
+{
+ return objects.front().get();
+}
+
+Objective *
+Orders::next()
+{
+ std::rotate(objects.begin(), objects.begin() + 1, objects.end());
+ return current();
+}