summaryrefslogtreecommitdiff
path: root/battles/src/RandomSpawner.h
diff options
context:
space:
mode:
Diffstat (limited to 'battles/src/RandomSpawner.h')
-rw-r--r--battles/src/RandomSpawner.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/battles/src/RandomSpawner.h b/battles/src/RandomSpawner.h
new file mode 100644
index 0000000..7505ae8
--- /dev/null
+++ b/battles/src/RandomSpawner.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <random>
+
+#include <kurator/battles/components.h>
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+class RandomSpawner
+{
+public:
+ RandomSpawner(int total_teams, double distance, double variation);
+ Transform get(int team);
+private:
+ const double angle_step;
+ std::random_device device;
+ std::uniform_real_distribution<double> distribution_d;
+ std::uniform_real_distribution<double> distribution_a;
+};
+
+
+} // namespace battles
+} // namespace kurator