summaryrefslogtreecommitdiff
path: root/sim/src/TeamManager.h
blob: c1432a75e3e91bca8410238298e302240b490780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

#include <random>
#include <vector>

#include <entt/entt.hpp>

#include <kurator/sim/State.h>


namespace kurator
{
namespace sim
{


class TeamManager
{
public:
	using Team = std::vector<entt::entity>;
	TeamManager();
	void extend(State& ctx);
	void add(int team, entt::entity entity);
	entt::entity random(int exclude);
	void update(State& ctx);
private:
	std::vector<Team> teams;
	std::mt19937 generator;
};


}  // namespace sim
}  // namespace kurator