diff options
author | Aki <please@ignore.pl> | 2022-12-04 00:37:54 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-12-04 00:37:54 +0100 |
commit | 25776ec71cc240cc0a30dd1113ad6bf1e53ddf37 (patch) | |
tree | e3617bd5c1f1b626445c3629ce30c393554b8f6c | |
parent | 13e4f3e3908220d484b01b9fb6dc4375ab28a16e (diff) | |
download | kurator-25776ec71cc240cc0a30dd1113ad6bf1e53ddf37.zip kurator-25776ec71cc240cc0a30dd1113ad6bf1e53ddf37.tar.gz kurator-25776ec71cc240cc0a30dd1113ad6bf1e53ddf37.tar.bz2 |
Extracted battlefield size and moved into Scenario
-rw-r--r-- | campaign/include/kurator/campaign/Scenario.h | 1 | ||||
-rw-r--r-- | campaign/src/scenarios.cpp | 1 | ||||
-rw-r--r-- | sim/src/BaseBattle.cpp | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/campaign/include/kurator/campaign/Scenario.h b/campaign/include/kurator/campaign/Scenario.h index 23647fc..cbefd56 100644 --- a/campaign/include/kurator/campaign/Scenario.h +++ b/campaign/include/kurator/campaign/Scenario.h @@ -15,6 +15,7 @@ namespace campaign struct Scenario { std::string name; + double radius; std::vector<ShipConfig> ships; int total_teams() const; }; diff --git a/campaign/src/scenarios.cpp b/campaign/src/scenarios.cpp index 06b4659..6fd0403 100644 --- a/campaign/src/scenarios.cpp +++ b/campaign/src/scenarios.cpp @@ -16,6 +16,7 @@ example() { return { "Example", + 12000, { {0, "Anvil", {"ChargeLaser", "ChargeLaser"}}, {0, "Anvil", {"ChargeLaser", "ChargeLaser"}}, diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 621b6bb..fc12b9c 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -22,7 +22,7 @@ namespace sim BaseBattle::BaseBattle(const campaign::Scenario& scenario) : _registry {}, - spawner {scenario.total_teams(), 12000, 0.1} + spawner {scenario.total_teams(), scenario.radius, 0.1} { const auto repo = universe::load_sample(); Builder build {_registry, spawner}; |