summaryrefslogtreecommitdiff
path: root/battles/src/TeamManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'battles/src/TeamManager.h')
-rw-r--r--battles/src/TeamManager.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/battles/src/TeamManager.h b/battles/src/TeamManager.h
new file mode 100644
index 0000000..384d9ee
--- /dev/null
+++ b/battles/src/TeamManager.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <random>
+#include <vector>
+
+#include <entt/entity/registry.hpp>
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+class TeamManager
+{
+public:
+ using Team = std::vector<entt::entity>;
+ TeamManager();
+ void add(int team, entt::entity entity);
+ Team get(int team) const;
+ entt::entity random(int team);
+ void clear(entt::registry& registry);
+private:
+ std::vector<Team> teams;
+ std::mt19937 generator;
+};
+
+
+} // namespace battles
+} // namespace kurator