diff options
Diffstat (limited to 'battles/src/TeamManager.h')
-rw-r--r-- | battles/src/TeamManager.h | 31 |
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 |