summaryrefslogtreecommitdiff
path: root/sim/src/RandomSpawner.h
diff options
context:
space:
mode:
Diffstat (limited to 'sim/src/RandomSpawner.h')
-rw-r--r--sim/src/RandomSpawner.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/sim/src/RandomSpawner.h b/sim/src/RandomSpawner.h
new file mode 100644
index 0000000..1ef2f20
--- /dev/null
+++ b/sim/src/RandomSpawner.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <random>
+
+#include <kurator/battles/components.h>
+
+#include "Spawner.h"
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+class RandomSpawner : public Spawner
+{
+public:
+ RandomSpawner(int total_teams, double distance, double variation);
+ Transform get(int team) override;
+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